mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-11 22:43:47 -05:00
Improve shellcheck compatibility
This commit is contained in:
@@ -31,7 +31,8 @@ _guiInput_() {
|
||||
# https://github.com/herrbischoff/awesome-osx-command-line/blob/master/functions.md
|
||||
if _haveScriptableFinder_; then
|
||||
local _guiPrompt="${1:-Password:}"
|
||||
local _guiInput=$(
|
||||
local _guiInput
|
||||
_guiInput=$(
|
||||
osascript &>/dev/null <<GUI_INPUT_MESSAGE
|
||||
tell application "System Events"
|
||||
activate
|
||||
@@ -39,7 +40,7 @@ _guiInput_() {
|
||||
end tell
|
||||
GUI_INPUT_MESSAGE
|
||||
)
|
||||
echo -n "${_guiInput}"
|
||||
printf "%s\n" "${_guiInput}"
|
||||
else
|
||||
error "No GUI input without macOS"
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user