mirror of
https://github.com/actions/runner.git
synced 2025-12-13 19:03:44 +00:00
Better error message when a command is not found (#1210)
* Describe missing util / command error in more detail * Use more uniform language in traceInfo
This commit is contained in:
@@ -115,11 +115,15 @@ namespace GitHub.Runner.Sdk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trace?.Info("Not found.");
|
#if OS_WINDOWS
|
||||||
|
trace?.Info($"{command}: command not found. Make sure '{command}' is installed and its location included in the 'Path' environment variable.");
|
||||||
|
#else
|
||||||
|
trace?.Info($"{command}: command not found. Make sure '{command}' is installed and its location included in the 'PATH' environment variable.");
|
||||||
|
#endif
|
||||||
if (require)
|
if (require)
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException(
|
throw new FileNotFoundException(
|
||||||
message: $"File not found: '{command}'",
|
message: $"{command}: command not found",
|
||||||
fileName: command);
|
fileName: command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user