Skip to content

Handle logout confirmation read errors#397

Open
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:logout-read-error
Open

Handle logout confirmation read errors#397
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:logout-read-error

Conversation

@GreyforgeLabs
Copy link
Copy Markdown

Summary

  • Parse logout confirmation through a fallible helper instead of ignoring stdin read errors.
  • Treat confirmation read failures as logout failures, so credentials are not removed without confirmed user intent.
  • Add regression coverage for yes/no parsing and read-error propagation.

Fixes PlatformNetwork/bounty-challenge#52531.

Validation

  • cargo test -p cortex-cli --test logout_confirmation --no-default-features --features cortex-tui -- --nocapture
  • cargo check -p cortex-cli --no-default-features --features cortex-tui
  • cargo fmt --package cortex-cli --check
  • git diff --check
  • git diff --cached --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [v0.0.7] run_logout can log the user out when stdin confirmation reading fails silently

1 participant