diff --git a/src/Runner.Worker/ActionManifestManager.cs b/src/Runner.Worker/ActionManifestManager.cs index 27fe0f043..d6b12019b 100644 --- a/src/Runner.Worker/ActionManifestManager.cs +++ b/src/Runner.Worker/ActionManifestManager.cs @@ -63,7 +63,11 @@ namespace GitHub.Runner.Worker // Instead of using Regex which can be computationally expensive, // we can just remove the # of characters from the fileName according to the length of the basePath string basePath = _hostContext.GetDirectory(WellKnownDirectory.Actions); - var fileName = manifestFile.Remove(0, basePath.Length + 1); + string fileName = manifestFile; + if (manifestFile.Length > basePath.Length + 1) + { + fileName = manifestFile.Remove(0, basePath.Length + 1); + } try {