From 4b391e1bf5d296a7e2c0d63a45149b08b0a7a4c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <git@minelli.swiss>
Date: Tue, 25 Mar 2025 14:32:32 +0100
Subject: [PATCH] GlobalHelper => Fix run command description

---
 .../src/commander/exercise/subcommands/ExerciseRunCommand.ts  | 2 +-
 NodeApp/src/helpers/GlobalHelper.ts                           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts b/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts
index 061c9cb..708e8c0 100644
--- a/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts
+++ b/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts
@@ -7,7 +7,7 @@ class ExerciseRunCommand extends CommanderCommand {
     protected commandName: string = 'run';
 
     protected defineCommand() {
-        GlobalHelper.runCommandDefinition(this.command)
+        GlobalHelper.runCommandDefinition(this.command, false)
             .description('locally run an exercise')
             .action(this.commandAction.bind(this));
     }
diff --git a/NodeApp/src/helpers/GlobalHelper.ts b/NodeApp/src/helpers/GlobalHelper.ts
index dc9d244..fcb6418 100644
--- a/NodeApp/src/helpers/GlobalHelper.ts
+++ b/NodeApp/src/helpers/GlobalHelper.ts
@@ -8,9 +8,9 @@ import Config              from '../config/Config';
 
 
 class GlobalHelper {
-    public runCommandDefinition(command: Command) {
+    public runCommandDefinition(command: Command, isAssignment: boolean = true): Command {
         command
-            .option('-p, --path <value>', 'assignment path', Config.folders.defaultLocalExercise)
+            .option('-p, --path <value>', `${ isAssignment ? 'assignment' : 'exercise' } path`, Config.folders.defaultLocalExercise)
             .option('-v, --verbose', 'verbose mode - display principal container output in live')
             .addOption(new Option('-w, --super-verbose', 'verbose mode - display all docker compose logs (build included) in live').conflicts('verbose'))
             .addOption(new Option('--verbose-ssj2').hideHelp().implies({ superVerbose: true }));
-- 
GitLab