Stops the Windows installer taking the terminal down with it. Every install through the advertised
irm … | iex path ended by closing the user's shell, whether it succeeded or failed.
Fixed
- The installer no longer exits the shell that ran it.
iexruns the script text in the caller's
own session rather than in a child process, so the script's top-levelexitterminated the
user's terminal, and the installer's status was handed back as the shell's own exit code - a run
blocked by application control ended[process exited with code 1 (0x00000001)], and a
successful one closed the window. The install had always finished first, which is what made this
look like rozi killing the terminal on success. The script now exits only when there is a real
script invocation to leave, detected through$PSCommandPath, which is empty underiexeven
when nested inside another script; every other caller receives the status through
$LASTEXITCODE.install.shwas never affected, becausecurl … | bashruns the script in a
child shell.
Full Changelog: v0.0.7...v0.0.8