From 75a30d7b49ab0f66f911670af43a6c9da7cfb4ea Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Tue, 29 Oct 2024 14:15:30 +0800 Subject: [PATCH] ci: linting - mount-helper: fix missing `-n`, however seems better to just always fetch a single line here - debug-network: fix WIP commit using `[[` in a sh script, instead of `[` --- commands/debug-network | 2 +- commands/mount-helper | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/debug-network b/commands/debug-network index ff7ac6943..8b91495ae 100755 --- a/commands/debug-network +++ b/commands/debug-network @@ -2,7 +2,7 @@ # can't do subshell wrapper, as in [sh] not [bash] # do not use any dorothy command, as this is eval'd on environments and situations where dorothy may not be available -if [[ "$*" = '--help' ]]; then +if [ "$*" = '--help' ]; then cat <<-EOF >/dev/stderr ABOUT: Runs a series of network debugging commands. diff --git a/commands/mount-helper b/commands/mount-helper index 9ae449d6a..956cbf2ca 100755 --- a/commands/mount-helper +++ b/commands/mount-helper @@ -951,7 +951,8 @@ function mount_helper() ( # no mounted devices, so try unmount devices eval_capture --statusvar=temp_status --stdoutvar=temp -- get-devices --quiet --result=node --no-mounted --node="$option_share" --filesystem="$mount_type" --label="$option_label" --count="$option_count" fi - if [[ -n $temp && $option_label ]]; then + if [[ -n $temp ]]; then + # get only the first line option_share="$(echo-first-line --stdin <<<"$temp")" fi if [[ $temp_status == 0 && -n $temp ]]; then