Skip to content

Commit

Permalink
for install, don't call abort if invoked with iex, because that will …
Browse files Browse the repository at this point in the history
…kill the ps session
  • Loading branch information
lukesampson committed Aug 1, 2013
1 parent 294aa02 commit f1d67b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ echo 'initializing...'
iex (new-object net.webclient).downloadstring($core_url)

# prep
if(installed 'scoop') { abort "scoop is already installed. run 'scoop update' to get the latest version." }
if(installed 'scoop') {
write-host "scoop is already installed. run 'scoop update' to get the latest version." -f red
# don't abort if invoked with iex——that would close the PS session
if($myinvocation.commandorigin -eq 'Internal') { return } else { exit 1 }
}
$dir = ensure (versiondir 'scoop' 'current')

# download scoop zip
Expand Down

0 comments on commit f1d67b5

Please sign in to comment.