Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix sh> operator issue on Windows #1654

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions digdag-docs/src/operators/sh.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ The shell defaults to `/bin/sh`. If an alternate shell such as `zsh` is desired,

On Windows, you can set PowerShell.exe to the `shell` option:

>= 0.10.4

_export:
sh:
shell: ["powershell.exe"]
script_name: runner.ps1

+step1:
sh>: step1.exe

+step2:
sh>: step2.ps1

< 0.10

_export:
sh:
shell: ["powershell.exe", "-"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private CommandStatus runCommand(final Config params, final CommandContext comma
{
final Path tempDir = workspace.createTempDir(String.format("digdag-sh-%d-", request.getTaskId()));
final Path workingDirectory = workspace.getPath(); // absolute
final Path runnerPath = tempDir.resolve("runner.sh"); // absolute
final Path runnerPath = tempDir.resolve(params.get("script_name", String.class, "runner.sh")); // absolute

final List<String> shell;
if (params.has("shell")) {
Expand Down