Skip to content

Commit

Permalink
Merge pull request #2834 from corbob/a1185-fix-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm authored Sep 27, 2022
2 parents b7934fd + 3ac2b5f commit 44c5283
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,14 @@ public string wrap_script_with_module(string script, IEnumerable<string> hookPre

private string get_script_arguments(string script, IEnumerable<string> hookPreScriptPathList, IEnumerable<string> hookPostScriptPathList, ChocolateyConfiguration config)
{
return "-packageScript '{0}' -installArguments '{1}' -packageParameters '{2}'{3}{4}{5}{6}".format_with(
return "-packageScript '{0}' -installArguments '{1}' -packageParameters '{2}'{3}{4} -preRunHookScripts {5} -postRunHookScripts {6}".format_with(
script,
prepare_powershell_arguments(config.InstallArguments),
prepare_powershell_arguments(config.PackageParameters),
config.ForceX86 ? " -forceX86" : string.Empty,
config.OverrideArguments ? " -overrideArgs" : string.Empty,
hookPreScriptPathList.Any() ? " -preRunHookScripts {0}".format_with(string.Join(",", hookPreScriptPathList)) : string.Empty,
hookPostScriptPathList.Any() ? " -postRunHookScripts {0}".format_with(string.Join(",", hookPostScriptPathList)) : string.Empty
hookPreScriptPathList.Any() ? "{0}".format_with(string.Join(",", hookPreScriptPathList)) : "$null",
hookPostScriptPathList.Any() ? "{0}".format_with(string.Join(",", hookPostScriptPathList)) : "$null"
);
}

Expand Down

0 comments on commit 44c5283

Please sign in to comment.