Skip to content

Commit 7469c97

Browse files
committed
change function
1 parent e954d24 commit 7469c97

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/core.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ function file_path($app, $file) {
153153
}
154154

155155
function cmd_available($cmd) {
156-
try { Get-Command $cmd -ea stop | out-null } catch { return $false }
157-
return $true
156+
return [Boolean](Get-Command $cmd -ErrorAction Ignore)
158157
}
159158

160159
function 7zip_path() {

0 commit comments

Comments
 (0)