Avoid storing pointer to nil (#411)
* Fix shellcheck Before this change: In - line 204: declare -F $next_command >/dev/null && $next_command ^-- SC2086: Double quote to prevent globbing and word splitting. --- FAIL: TestBashCompletions (0.34s) bash_completions_test.go:138: shellcheck failed: exit status 1 * Avoid storing pointer to nil Before this change, the new test fails with: --- FAIL: TestSetOutput (0.00s) command_test.go:198: expected setting output to nil to revert back to stdout, got <nil>
This commit is contained in:
committed by
Eric Paris
parent
6421115516
commit
7aeaa2cce6
@ -225,7 +225,7 @@ __handle_command()
|
||||
fi
|
||||
c=$((c+1))
|
||||
__debug "${FUNCNAME[0]}: looking for ${next_command}"
|
||||
declare -F $next_command >/dev/null && $next_command
|
||||
declare -F "$next_command" >/dev/null && $next_command
|
||||
}
|
||||
|
||||
__handle_word()
|
||||
|
Reference in New Issue
Block a user