From 99c14d69c80050598a50b5e3d9b649895703c396 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Sun, 30 Sep 2018 17:24:10 +0000 Subject: [PATCH] pass script phase as arg 0 --- zpm-runscript.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zpm-runscript.c b/zpm-runscript.c index ccaee48..a3f4c2f 100644 --- a/zpm-runscript.c +++ b/zpm-runscript.c @@ -148,10 +148,12 @@ int main(int ac, char **av){ pkgid = zpm_findpkg(&zpm, pkgstr); if (pkgid) { if (zpm_script_hash(&zpm, pkgid, phase, hash)) { + /* since the script file name doesn't really + * mean anything, pass in the phase as arg 0 + */ - /* perhaps also pass in the phase name? or ENV? */ /* TODO sanitize environment ? */ - args[0] = script; + args[0] = phase; args[1] = pkgid; args[2] = 0; args[3] = 0; -- 2.40.0