dagucloud / dagucloud/dagu

Use `mvdan/sh` as the default command executor shell

Open
#1,259 3 comments 0 reactions 1 assignee Claimed by @yohamta0 View on GitHub
Dominant language
Go
Stars
4k
Forks
332
Avg merge
19h 26m
Merged PRs (30d)
133

Description

Dagu currently launches workflow steps through the platform shell returned by `cmdutil.GetShellCommand("")`. On UNIX this typically resolves to `/bin/sh` (with `-e` appended), while on Windows it falls back to `powershell` or `cmd.exe`. This proposal switches the default executor path to run commands through the Go-native interpreter provided by [`mvdan.cc/sh/v3`](https://github.com/mvdan/sh), providing consistent POSIX shell semantics across platforms while keeping the existing `shell` override for users who need a specific shell binary.

**Requirements**
- Adopt `mvdan/sh` as the default command runner for steps that do not specify `shell`.
- Ensure shell features (pipelines, redirects, here-docs, command substitution, boolean operators, exit status propagation) work consistently on all supported platforms.
- Maintain existing logging, stderr tail capture, environment injection, and working-directory handling in the executor.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.