mirror of
https://github.com/actions/runner.git
synced 2025-12-11 21:06:55 +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
|
else
|
||||||
{
|
{
|
||||||
var fullPath = IOUtil.ResolvePath(actionEntryDirectory, "."); // resolve full path without access filesystem.
|
var reference = repositoryReference.Name;
|
||||||
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?");
|
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