diff options
| author | tv <tv@krebsco.de> | 2026-11-13 20:28:01 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-13 21:59:20 +0100 |
| commit | a8db913b7144dbcdbe479f32c12c4dd8c21e0675 (patch) | |
| tree | 098c0668d0e420a6891a8a2f204fbdd1a2b6c879 /pkgs/populate | |
| parent | 24fd14b1e6de45def6a59b65486f5035ac486ee3 (diff) | |
populate: run pipe commands through a shell
A pipe source's command is an absolute path, which a shell runs as a
script if it isn't a program, e.g. lacks #!. The program ran it
directly, which fails for such a command.
pipe-script runs a pipe command without #!.
Diffstat (limited to 'pkgs/populate')
| -rw-r--r-- | pkgs/populate/src/populate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/populate/src/populate.rs b/pkgs/populate/src/populate.rs index 226cee2..40f86dd 100644 --- a/pkgs/populate/src/populate.rs +++ b/pkgs/populate/src/populate.rs @@ -114,9 +114,9 @@ fn deliver( let file = fs::File::create(&out).map_err(|e| { Failure::Message(format!("error: can't create {}: {e}", out.display())) })?; + // Through a shell, which runs a command without #! as a script. run::status( - Command::new(string(settings, "command")?) - .current_dir(&workdir) + run::local_shell("\"$1\"\n", &[string(settings, "command")?], &workdir) .stdout(file), )?; run::status( |
