From cb78e9b54a14ecd46fd114424c0f6a0a80b0925c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 3 Jan 2018 22:43:39 +0100 Subject: [PATCH] Parse buildenv.sh after commands.sh. The ordering here is important, otherwise the Linux path in buildenv.sh tries to use the INSTALL_DIR variable and fails. This fixes #15. Thanks @cvanderw for the report. --- chocpkg/chocpkg | 3 +++ chocpkg/commands.sh | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chocpkg/chocpkg b/chocpkg/chocpkg index bdabf35..7f55b43 100755 --- a/chocpkg/chocpkg +++ b/chocpkg/chocpkg @@ -32,7 +32,10 @@ if [ -z "${CHOCPKG_ROOT:-}" ]; then chocpkg::set_root fi +# Ordering here matters, since we rely on basic setup of standard variables +# in commands.sh for some of the evaluation in buildenv.sh: . "$CHOCPKG_ROOT/chocpkg/commands.sh" +. "$CHOCPKG_ROOT/buildenv.sh" chocpkg::commands::command "$@" diff --git a/chocpkg/commands.sh b/chocpkg/commands.sh index f848b1d..a3c608a 100755 --- a/chocpkg/commands.sh +++ b/chocpkg/commands.sh @@ -1,7 +1,6 @@ # This file contains implementations of the commands accepted on the CLI. . "$CHOCPKG_ROOT/chocpkg/functions.sh" -. "$CHOCPKG_ROOT/buildenv.sh" # basic_setup is invoked on script startup to set various environment variables # and create basic directories used throughout the rest of the script.