diff options
| author | Lucas Trzesniewski <lucas.trzesniewski@gmail.com> | 2026-02-02 21:25:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-02 12:25:00 -0800 |
| commit | 046ae54485b95ac5e242ce48892191ae997ff1f8 (patch) | |
| tree | 3cdd96a1cc1f35391982683a05fff06e6caba288 /crates/atuin-server-postgres/migrations/20231202170508_create-store.sql | |
| parent | chore(deps): update whoami dependency to v2 (#3118) (diff) | |
| download | atuin-046ae54485b95ac5e242ce48892191ae997ff1f8.zip | |
fix(powershell): preserve `$LASTEXITCODE` (#3120)
`$LASTEXITCODE` is an [automatic
variable](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.5#lastexitcode)
in PowerShell which holds the exit code of the last *native* program
which has run. It's a close equivalent to `$?` in bash (PowerShell also
has [its own `$?`
variable](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.5#section-1),
but it's a boolean).
Atuin is a native program, and the `PSConsoleHostReadLine` function
calls `atuin history start`, which resets this variable to 0 (or to
something else if it fails).
This PR resets this variable to its previous value, as it is that one
which the user will expect.
Before:
<img width="453" height="225" alt="image"
src="https://github.com/user-attachments/assets/5fc781d3-dbba-4737-b2ec-7ba73739d006"
/>
After:
<img width="460" height="212" alt="image"
src="https://github.com/user-attachments/assets/a2db9bca-343c-48fc-ab45-167e0dd6f7f9"
/>
Default behavior (without a profile file or Atuin):
<img width="351" height="147" alt="image"
src="https://github.com/user-attachments/assets/47d6aa28-1ea9-4e55-9879-98359ad3fbcf"
/>
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
Diffstat (limited to 'crates/atuin-server-postgres/migrations/20231202170508_create-store.sql')
0 files changed, 0 insertions, 0 deletions
