diff --git a/headstart-core.bash b/headstart-core.bash index b4eba528598d466ea162bc9dc6b66a336f1b0643..62ace8004a72543654bb198f4af9059bcaaeb426 100644 --- a/headstart-core.bash +++ b/headstart-core.bash @@ -50,12 +50,6 @@ cd "$PROJECT_DIR" . "$_HEADSTART_CORE_DIR/headstart-load-libs.bash" "$@" \ "${_HEADSTART_CORE_DIR#$PROJECT_DIR/}/"{commands,} - -tmp_dir="${_HEADSTART_SCRIPT_NAME~~}_TMP_DIR" -declare -gx _HEADSTART_TMP_DIR="${!tmp_dir}" -declare -gx _HEADSTART_VENDOR_DIR="${_HEADSTART_CORE_DIR}/vendor" - -declare -gx HEADSTART_RESOURCES_DIR="${HEADSTART_RESOURCES_DIR-resources}" declare -gx _HEADSTART_CMD="${_GO_CMD##*/}" declare -gx _HEADSTART_PROJECT_CONFIG="${HEADSTART_PROJECT_CONFIG-data/config/project.conf}" declare -gx _HEADSTART_CORE_LOCK="${HEADSTART_CORE_LOCK-data/config/.core.lock}" @@ -64,9 +58,17 @@ declare -x _GO_HELP_HIJACK=true declare -x GO_TAB_COMPLETIONS_PATTERN='' . "$_GO_USE_MODULES" 'core' - core_get_installed_version -core_parse_project_config + +function headstart_bootstrap() { + tmp_dir="${_HEADSTART_SCRIPT_NAME~~}_TMP_DIR" + declare -gx _HEADSTART_TMP_DIR="${!tmp_dir}" + declare -gx _HEADSTART_VENDOR_DIR="${_HEADSTART_CORE_DIR}/vendor" + + declare -gx HEADSTART_RESOURCES_DIR="${HEADSTART_RESOURCES_DIR-resources}" + + core_parse_project_config +} function headstart() { local trace=false @@ -137,7 +139,6 @@ function headstart() { . "$_GO_USE_MODULES" 'system' - set_standard_outputs set_trace "$debug" set_debug_levels "$verbosity" unset verbosity diff --git a/lib/io b/lib/io index eade732ae526470c4dac85506ad678b33ea8c299..4442e6e3a21b0ad427f90fd1bac611712c055699 100755 --- a/lib/io +++ b/lib/io @@ -127,7 +127,7 @@ function abort() { function warn() { @required [string] message - COLUMNS=91 @go.printf "${UI_Color_Magenta}Warning: %b%s${UI_Color_Default}\n" "$message" >&"${STDERR}" + COLUMNS=100 @go.printf "${UI_Color_Magenta}Warning: %b%s${UI_Color_Default}\n" "$message" >&"${STDERR}" } function set_standard_outputs() { @@ -147,7 +147,7 @@ function set_standard_outputs() { exec 9>&2 exec 1>&2 - if [ "$debug" = ffffalse ]; then + if [[ "${debug-false}" == ffffalse ]]; then # We do not want to output every command run in the scripts to the screen. # We only want to do that if the user requested it for debugging purposes. # Otherwise, we need to output only informational text with the `info` @@ -168,3 +168,5 @@ function color_stderr() { @required [string] command "$@" 2> >(while read line; do echo -e "\e[01;31merror: $line\e[0m" >&2; done) } + +set_standard_outputs