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.
This commit is contained in:
Simon Howard 2018-01-03 22:43:39 +01:00
parent 5891dc3b60
commit cb78e9b54a
2 changed files with 3 additions and 1 deletions

View file

@ -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 "$@"

View file

@ -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.