Skip to content

Commit

Permalink
fix(history): logic for store_failed=false (#2284)
Browse files Browse the repository at this point in the history
* chore: ignore .envrc

* fix(history): Check passed exit param instead of not-yet set h.exit
  • Loading branch information
JRGould authored Jul 17, 2024
1 parent 06c8ebd commit 62f3807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.vscode/
result
publish.sh
.envrc

ui/backend/target
ui/backend/gen
2 changes: 1 addition & 1 deletion crates/atuin/src/command/client/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ impl Cmd {
return Ok(());
}

if !settings.store_failed && h.exit != 0 {
if !settings.store_failed && exit > 0 {
debug!("history has non-zero exit code, and store_failed is false");

// the history has already been inserted half complete. remove it
Expand Down

0 comments on commit 62f3807

Please sign in to comment.