mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Fix error message reported on non-local action setup (#2668)
* Fix error message reported on non-local action setup * Remove tostring left from string builder
This commit is contained in:
@@ -1127,8 +1127,16 @@ namespace GitHub.Runner.Worker
|
||||
}
|
||||
else
|
||||
{
|
||||
var fullPath = IOUtil.ResolvePath(actionEntryDirectory, "."); // resolve full path without access filesystem.
|
||||
throw new InvalidOperationException($"Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '{fullPath}'. Did you forget to run actions/checkout before running your local action?");
|
||||
var reference = repositoryReference.Name;
|
||||
if (!string.IsNullOrEmpty(repositoryReference.Path))
|
||||
{
|
||||
reference = $"{reference}/{repositoryReference.Path}";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(repositoryReference.Ref))
|
||||
{
|
||||
reference = $"{reference}@{repositoryReference.Ref}";
|
||||
}
|
||||
throw new InvalidOperationException($"Can't find 'action.yml', 'action.yaml' or 'Dockerfile' for action '{reference}'.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user