From a04f98b539e7a906b00c019ab4078d36b9f754ed Mon Sep 17 00:00:00 2001 From: Lajos Papp Date: Fri, 24 Jan 2025 20:01:04 +0100 Subject: [PATCH] fix: shell dry-run output should be runable (#729) I've redirected the output of `runme run --dry-run` into a file. The code block was of bash type and the file nicely starts with shebang. --- internal/runner/shell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/runner/shell.go b/internal/runner/shell.go index 76c7a8866..a979e316d 100644 --- a/internal/runner/shell.go +++ b/internal/runner/shell.go @@ -40,7 +40,7 @@ func (s Shell) DryRun(ctx context.Context, w io.Writer) { var b bytes.Buffer _, _ = b.WriteString(fmt.Sprintf("#!%s\n\n", s.ProgramPath())) - _, _ = b.WriteString(fmt.Sprintf("// run in %q\n\n", s.Dir)) + _, _ = b.WriteString(fmt.Sprintf("# run in %q\n\n", s.Dir)) _, _ = b.WriteString(prepareScriptFromCommands(s.Cmds, s.ShellType())) _, err := w.Write(b.Bytes())