nixpkgs/pkgs/by-name/ha/haredo/001-use-nix-store-sh.patch
Coutinho de Souza b155c656a0
haredo: remove shell wrapper overhead
There's only three mentions of `sh` in the source code, being only two
of them command calls; thus, is very trivial to patch them directly.
2024-05-16 13:09:03 -03:00

21 lines
762 B
Diff

diff --git a/src/haredo.ha b/src/haredo.ha
index c2e56e6..304c9ad 100644
--- a/src/haredo.ha
+++ b/src/haredo.ha
@@ -280,12 +280,12 @@ fn try_do(
const tmpfilepath = strings::concat(ctx.tmpdir, "/", tmpfilename);
const cmd = if (ctx.verbose) {
- fmt::errorln("* sh -ev", dopaths.do, dopaths.target,
+ fmt::errorln("* @bash@/bin/sh -ev", dopaths.do, dopaths.target,
dopaths.basename, tmpfilepath)?;
- yield exec::cmd("sh", "-ev", dopaths.do, dopaths.target,
+ yield exec::cmd("@bash@/bin/sh", "-ev", dopaths.do, dopaths.target,
dopaths.basename, tmpfilepath)?;
} else {
- yield exec::cmd("sh", "-e", dopaths.do, dopaths.target,
+ yield exec::cmd("@bash@/bin/sh", "-e", dopaths.do, dopaths.target,
dopaths.basename, tmpfilepath)?;
};