Skip to content

Commit 7d5a47c

Browse files
authored
fix(install): Use 'Get-Command' to test scoop install status (#4785)
1 parent 04b30de commit 7d5a47c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- **depends:** Prevent error on no URL ([#4595](https://github.com/ScoopInstaller/Scoop/issues/4595))
2626
- **depends:** Check if extractor is available ([#4042](https://github.com/ScoopInstaller/Scoop/issues/4042))
2727
- **decompress:** Fix nested Zstd archive extraction ([#4608](https://github.com/ScoopInstaller/Scoop/issues/4608), [#4639](https://github.com/ScoopInstaller/Scoop/issues/4639))
28-
- **installed:** Fix 'core/installed' that mark failed app as 'installed' ([#4650](https://github.com/ScoopInstaller/Scoop/issues/4650), [#4676](https://github.com/ScoopInstaller/Scoop/issues/4676), [#4689](https://github.com/ScoopInstaller/Scoop/issues/4689))
28+
- **installed:** Fix 'core/installed' that mark failed app as 'installed' ([#4650](https://github.com/ScoopInstaller/Scoop/issues/4650), [#4676](https://github.com/ScoopInstaller/Scoop/issues/4676), [#4689](https://github.com/ScoopInstaller/Scoop/issues/4689), [#4785](https://github.com/ScoopInstaller/Scoop/issues/4785))
2929
- **no-junctions:** Fix error when `NO_JUNCTIONS` is been set ([#4722](https://github.com/ScoopInstaller/Scoop/issues/4722), [#4726](https://github.com/ScoopInstaller/Scoop/issues/4726))
3030
- **shim:** Fix PS1 shim error when in different drive in PS7 ([#4614](https://github.com/ScoopInstaller/Scoop/issues/4614))
3131
- **shim:** Fix `sh` shim error in WSL ([#4637](https://github.com/ScoopInstaller/Scoop/issues/4637))

bin/install.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Write-Output 'Initializing...'
3333
Invoke-Expression (new-object net.webclient).downloadstring($core_url)
3434

3535
# prep
36-
if (installed 'scoop') {
36+
if (Get-Command -Name 'scoop' -ErrorAction SilentlyContinue) {
3737
write-host "Scoop is already installed. Run 'scoop update' to get the latest version." -f red
3838
# don't abort if invoked with iex that would close the PS session
3939
if ($myinvocation.mycommand.commandtype -eq 'Script') { return } else { exit 1 }

0 commit comments

Comments
 (0)