Skip to content

Commit

Permalink
get-app, setup-util: quiet winget.exe checks
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Oct 28, 2023
1 parent e3e9ef4 commit 055a67d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion commands/get-app
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ function get_app() (
echo-error 'Install Winget to be able to detect applications'
return 6 # ENXIO 6 Device not configured
fi
winget.exe list "$name"
if test "$quiet" = 'yes'; then
winget.exe list --disable-interactivity "$name" &> /dev/null
else
winget.exe list --disable-interactivity "$name"
fi
return
else
echo-error 'Support for Applications not added yet for this platform.'
Expand Down
2 changes: 1 addition & 1 deletion commands/setup-util
Original file line number Diff line number Diff line change
Expand Up @@ -3098,7 +3098,7 @@ function setup_util() (
# https://docs.microsoft.com/en-us/windows/package-manager/winget/
# https://docs.microsoft.com/en-us/windows/package-manager/winget/install
function is_this_winget_package_installed {
winget.exe list --id="$package" &>/dev/null
winget.exe list --disable-interactivity --id="$package" &>/dev/null
}
function are_any_of_these_winget_packages_installed { # 👍 /docs/bash/errors: robust exit status
local package packages=("$@")
Expand Down

0 comments on commit 055a67d

Please sign in to comment.