Skip to content

Add variable to query debug mode #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ generate_command_to_repeat_experiment() {
cmd+=("-f")
fi

if [[ "${_arg_debug}" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
cmd+=("--debug")
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ generate_command_to_repeat_experiment() {
cmd+=("-f")
fi

if [[ "${_arg_debug}" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
cmd+=("--debug")
fi

Expand Down
4 changes: 2 additions & 2 deletions components/scripts/lib/build_scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ read_build_scan_metadata() {
local build_scan_metadata
build_scan_metadata=$(< "${BUILD_SCAN_FILE}")

if [[ "$_arg_debug" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
debug "Raw Build Scan metadata (build-scans.csv)"
debug "---------------------------"
debug "${build_scan_metadata}"
Expand Down Expand Up @@ -45,7 +45,7 @@ fetch_and_read_build_scan_data() {

local args=()

if [[ "$_arg_debug" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
args+=("--debug")
fi

Expand Down
6 changes: 5 additions & 1 deletion components/scripts/lib/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ process_arguments() {
if [ -n "${_arg_interactive+x}" ]; then
interactive_mode="${_arg_interactive}"
fi

if [ -n "${_arg_debug+x}" ]; then
debug_mode="${_arg_debug}"
fi
}

validate_required_config() {
Expand Down Expand Up @@ -277,7 +281,7 @@ generate_command_to_repeat_experiment() {
cmd+=("-f")
fi

if [[ "${_arg_debug}" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
cmd+=("--debug")
fi

Expand Down
4 changes: 2 additions & 2 deletions components/scripts/lib/info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ warn() {
}

debug() {
if [[ "$_arg_debug" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
echo "${DEBUG_COLOR}$*${RESTORE}"
fi
}
Expand All @@ -48,7 +48,7 @@ comparison_summary_row() {
}

print_bl() {
if [[ "$_arg_debug" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
debug "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
else
echo
Expand Down
2 changes: 1 addition & 1 deletion components/scripts/lib/java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ invoke_java() {
eval set -- -Dpicocli.ansi=true -jar "\"$classpath\"" "$(save "${args[@]}")"

# shellcheck disable=SC2154
if [[ "$_arg_debug" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
debug "$JAVACMD $*" 1>&2
print_bl 1>&2
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ generate_command_to_repeat_experiment() {
cmd+=("-f")
fi

if [[ "${_arg_debug}" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
cmd+=("--debug")
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ generate_command_to_repeat_experiment() {
cmd+=("-f")
fi

if [[ "${_arg_debug}" == "on" ]]; then
if [[ "${debug_mode}" == "on" ]]; then
cmd+=("--debug")
fi

Expand Down