Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some CLI improvements #531

Merged
merged 4 commits into from
Oct 21, 2024
Merged

Some CLI improvements #531

merged 4 commits into from
Oct 21, 2024

Conversation

nepet
Copy link
Collaborator

@nepet nepet commented Oct 18, 2024

This PR addresses some of the improvements suggested in #515.

@cdecker
Copy link
Collaborator

cdecker commented Oct 21, 2024

Nice improvements, just one more idea for a further improvement down the line.

@cdecker cdecker closed this Oct 21, 2024
@cdecker cdecker reopened this Oct 21, 2024
@cdecker
Copy link
Collaborator

cdecker commented Oct 21, 2024

And pressing Shift while commenting closes the PR, my bad ☹️

@cdecker cdecker enabled auto-merge (rebase) October 21, 2024 10:45
nepet added 4 commits October 21, 2024 17:36
As we do not show bip39 mnenomics at the moment, there is no need to go the way through a mnemonic

Signed-off-by: Peter Neuroth <[email protected]>
Signed-off-by: Peter Neuroth <[email protected]>
A flush is not needed here as `File` utilizes Os memory (afaict) which
will write to the fs once we drop the `File`.

We still a manual `sync_all()` to catch any errors that could arise
writing to the fs that we would miss if we just drop the `File`.

Signed-off-by: Peter Neuroth <[email protected]>
@cdecker cdecker force-pushed the 2442-glcli-additions branch from b0ce0e4 to 065cc36 Compare October 21, 2024 15:36
@cdecker cdecker merged commit aaed0f0 into main Oct 21, 2024
12 checks passed
@cdecker cdecker deleted the 2442-glcli-additions branch October 21, 2024 15:49
Comment on lines +62 to +63
.map(|d| util::DataDir(PathBuf::from_str(&d).expect("is not a valid path")))
.unwrap_or_default();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would a combination of .flatten() and emitting a Result<> in the .map() be an alternative to prevent panicking inside of a closure? My main concern is that this error might not be a rare one, and we might want insightful error messages.

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.

2 participants