From b3ab3f746ffd20b7a8b480ee72f777f547e55067 Mon Sep 17 00:00:00 2001 From: Patrick Ellis Date: Wed, 15 Sep 2021 18:08:31 -0400 Subject: [PATCH] Localize help message to the current platform --- src/Runner.Listener/Program.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Runner.Listener/Program.cs b/src/Runner.Listener/Program.cs index a24224dad..bc6361769 100644 --- a/src/Runner.Listener/Program.cs +++ b/src/Runner.Listener/Program.cs @@ -95,7 +95,16 @@ namespace GitHub.Runner.Listener var unknownCommandlines = command.Validate(); if (unknownCommandlines.Count > 0) { - terminal.WriteError($"Unrecognized command-line input arguments: '{string.Join(", ", unknownCommandlines)}'. For usage refer to: .\\config.cmd --help or ./config.sh --help"); + string separator; + string ext; +#if OS_WINDOWS + separator = "\\"; + ext = "cmd"; +#else + separator = "/"; + ext = "sh"; +#endif + terminal.WriteError($"Unrecognized command-line input arguments: '{string.Join(", ", unknownCommandlines)}'. For usage refer to `.{separator}config.{ext} --help`"); } // Defer to the Runner class to execute the command.