Repository navigation
Windows: native TLS for tsk update and the update check; accept BOM-prefixed JSON plans - #161
Merged
Merged
Conversation
ureq 3 defaults to Rustls, which this build does not enable, so tsk update and the board's update check panicked on Windows. Set NativeTls explicitly, run the check on a named thread whose panics never print over the TUI, and strip a leading UTF-8 BOM from JSON plans (Windows PowerShell 5.1 default).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Owner
Author
|
Pass 1 addressed in 88991ef: the default Windows regression is now offline (127.0.0.1 listener that drops the connection, asserts |
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.
Hotfix for T195. No version bump or release files.
Changes
download_https(src/cli/update.rs): setTlsProvider::NativeTlsexplicitly. ureq 3 defaults to Rustls, which our feature set does not compile in, so the first HTTPS request panicked (tsk updateexit 101; the board's update check panicked on every start and printed over the TUI).src/update.rs): runs on a namedtsk-update-checkthread; a once-installed panic hook swallows panics on that thread only and forwards every other panic to the previous hook. Check still fails silently.parse_plan(src/cli/mod.rs): strip a leading UTF-8 BOM (Windows PowerShell 5.1 default forSet-Content -Encoding UTF8/Out-File).cli.mdnote on BOM.Tests
cli::update::tests::windows_download_https_fails_without_panicking_when_the_peer_drops(Windows only, offline: local listener that drops the connection; assertsErr, not a panic). Runs in the default suite on the windows CI jobs.cli::update::tests::windows_download_https_fetches_the_installer_live(Windows only,#[ignore], real fetch ofhttps://www.gettsk.sh/install.ps1; run with-- --ignored).update::tests::quiet_panic_hook_silences_only_the_named_thread.cli_add::plan_with_utf8_byte_order_mark_parses_from_file_and_stdin(file + stdin).Verification
cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo testpasses.cargo clippy --all-targets --target x86_64-pc-windows-gnu -- -D warningsclean.invalid JSON plan: expected value at line 1 column 1)..tls_config(tls)removed the offline test fails with the ureq panic attransport/mod.rs:485. Release buildtsk updatedownloads, verifies checksum, and completes (exit 0) instead of panicking. Note: with current == latest it reinstalls v0.11.6 rather than printing "up to date" (existing behaviour, unchanged here).