Skip to content

Commit

Permalink
ci: linting
Browse files Browse the repository at this point in the history
- 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 `[`
  • Loading branch information
balupton committed Oct 29, 2024
1 parent 3bf0e55 commit 75a30d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/debug-network
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion commands/mount-helper
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75a30d7

Please sign in to comment.