Skip to content

Commit

Permalink
Revert bash and shell -e filePath escape (actions#1932)
Browse files Browse the repository at this point in the history
It generated invalid arguments for `Process()` when the `bash` command itself was an argument as well, for example:

```
            _proc.StartInfo.FileName = "/usr/bin/docker";
            _proc.StartInfo.Arguments = "exec -i --workdir /__w/container-hook-e2e/container-hook-e2e 47105c66144d8809d9fa2bce9a58ea0564cd14def0ae7952cd6231fba3576db1 sh -e '/__w/_temp/fd086560-cb92-4f3b-a99c-35a6b7b1bbdb.sh'";
```
  • Loading branch information
fhammerl authored Jun 9, 2022
1 parent c3d5449 commit 0431b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ internal class ScriptHandlerHelpers
["cmd"] = "/D /E:ON /V:OFF /S /C \"CALL \"{0}\"\"",
["pwsh"] = "-command \". '{0}'\"",
["powershell"] = "-command \". '{0}'\"",
["bash"] = "--noprofile --norc -e -o pipefail '{0}'",
["sh"] = "-e '{0}'",
["bash"] = "--noprofile --norc -e -o pipefail {0}",
["sh"] = "-e {0}",
["python"] = "{0}"
};

Expand Down

0 comments on commit 0431b6f

Please sign in to comment.