diff --git a/digdag-docs/src/operators/sh.md b/digdag-docs/src/operators/sh.md index 5c37a4b24b..548a693a36 100644 --- a/digdag-docs/src/operators/sh.md +++ b/digdag-docs/src/operators/sh.md @@ -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", "-"] diff --git a/digdag-standards/src/main/java/io/digdag/standards/operator/ShOperatorFactory.java b/digdag-standards/src/main/java/io/digdag/standards/operator/ShOperatorFactory.java index aec2de7872..b1c31672e4 100644 --- a/digdag-standards/src/main/java/io/digdag/standards/operator/ShOperatorFactory.java +++ b/digdag-standards/src/main/java/io/digdag/standards/operator/ShOperatorFactory.java @@ -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 shell; if (params.has("shell")) {