Repository navigation
fix: start normally when a command-line argument is not valid UTF-8 - #18
Closed
MotherSphere wants to merge 1 commit into
Closed
MotherSphere wants to merge 1 commit into
MotherSphere wants to merge 1 commit into
Conversation
The --version check read argv with std::env::args(), which panics on an argument that is not valid Unicode, so a file manager passing a Latin-1 path aborted Avalon at startup. Read argv as OsString instead. Also replace an em dash in a Cargo.toml comment.
Member
Author
|
Folded into #20, which carries this commit unchanged and keeps its changelog entry through a commit override. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
--version/-Vcheck added in build: publish signed releases through release-please, with --version and no Windows console window #15 read the command line withstd::env::args(), which panics when an argument is not valid Unicode. On Linux and macOS a file manager or script passing a Latin-1 path made Avalon abort at startup instead of opening the editor. The check now reads the arguments asOsString(std::env::args_os()), so any argument is accepted and--versionbehaves as before.Cargo.tomlused an em dash; it is now a comma.How it was verified
avalon --versionandavalon -Vprintavalon 0.1.0and exit 0;avalon <Latin-1 bytes> --versionalso prints the version and exits 0 (it panicked before).cargo fmt --checkpasses. CI runs the three-OS matrix, clippy and MSRV.