chore(deps): update rust crate open to v5.4.5 (master) #342
No reviewers
Labels
No labels
ci
crate/dtmm
crate/dtmt
crate/sdk
crate/serde_sjson
kind
bug
kind
documentation
kind
enhancement
kind
feature
kind
question
kind
upstream
part/bundle
part/filetype
stage
actionable
stage
design
stage
proposal
status/duplicate
status/good first issue
status/help wanted
status/invalid
status
need-replicate
status/wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitsquid_dt/dtmt!342
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/master-open-5.x-lockfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
5.3.3→5.4.5Release Notes
Byron/open-rs (open)
v5.4.5Compare Source
Bug Fixes
check that_detached launchers for immediate failures
that_detached()returned as soon as a launcher spawned, so a launcher thatfailed right after starting was reported as success and no fallback ran.
Observe each launcher for 250 ms by delegating to
that_detached_with_timeout(). A launcher that exits unsuccessfully withinthat window falls through to the next candidate; one still running is treated
as handed off. The macOS and
shellexecute-on-windowspaths are unchanged.Extend the fixture tests to call
that_detached()directly.restore launcher fallback and support Plasma 6
When
xdg-openstarts but exits unsuccessfully,that()and the CLIpreviously stopped before trying another installed opener. On Plasma 6,
the fallback list also omitted the versioned KDE launchers.
Launcher behavior
unsuccessful exit when later candidates are missing.
kde-open6andkde-open5before the existingkde-openfallback.together so compatibility decisions are explicit.
for option-shaped and non-UTF-8 paths.
Bounded detached checks
Add
that_detached_with_timeout(path, timeout)to opt into checking theactual launcher status for a configurable interval per candidate. Retry
confirmed UNIX launcher failures; consider successful exits or launchers
still running at the deadline handed off. A zero timeout polls once.
On UNIX, use
setsid()while retaining the launcher as a child. Reserve abackground waiter before spawning and transfer ownership after a timeout
so the launcher can outlive its caller and is eventually reaped. Stop
fallback if observing an already-started launcher fails, avoiding a second
launch based only on a wait error. Existing detached calls retain their
timing behavior. The new API uses command-based launchers on Windows,
including when
shellexecute-on-windowsis enabled.Historical constraints
55dc10drelaxed exit checks for argumentless availability probes, whereusage errors are expected. It did not establish that failed real opening
operations should stop fallback.
245c95eintroduced that behavior;the earlier implementation retried unsuccessful operations.
Keep stderr redirected to null:
30a144aand0bdc6d6document previouspipe deadlocks and hangs. Do not interpret the successful double-fork
intermediate child's exit as launcher success (
a78c0ca,43e601d).Document these constraints and upstream launcher behavior in
docs/launchers.md. Excludekioclient exec, which enables executionbeyond
kde-open's behavior, and arbitrary file-manager or AppImageenvironment fallbacks that could override configured handlers.
Validation and limits
selection, Plasma 6 reachability, timeouts, child reaping, survival after
caller exit, large stderr output, argument protection, and CLI behavior.
git diff --check, and all-target, all-feature Linux clippypass. Windows and macOS compile checks and clippy also pass.
that opens a target before reporting failure can cause a duplicate open
when retried. Failures after the timeout cannot trigger fallback.
Commit Statistics
Commit Details
view details
4e64f6b)c88759b)42a34b0)279c1b2)v5.4.4Compare Source
Bug Fixes
open Windows paths without wildcard expansion
Opening a child of a bracket-named directory fails because Start-Process
resolves parent directories as PowerShell wildcard patterns. The isolated
Windows regression test reproduced WildcardPatternException for a copied
executable under "【Tiny Asa】 [77P7V-712MB]\child" before this change.
Use Test-Path and Invoke-Item with LiteralPath for existing items, retaining
Start-Process for URLs and application names. These cmdlets also work under
PowerShell Constrained Language Mode. Share the embedded script between
Windows and WSL, keep targets in environment data, and stop on launch errors
to report a nonzero exit status. Preserve the security boundary established
in
fd29861: cmd /c start remains opt-in through the insecure feature. Nopreviously removed launcher options are restored.
The integration test launches only a copy of its own test binary, which
records its executable path and exits. It checks absolute and relative paths
with invalid and valid bracket patterns, Unicode, backticks, quotes, shell
metacharacters, and leading dashes in normal and constrained PowerShell
sessions, plus failure for a missing executable. It requires neither Explorer
nor registered document or URL handlers. Adjust the existing fallback
assertion to also allow the opt-in cmd launcher after Explorer with all
features enabled.
Validated locally on Windows with PowerShell 5.1.26100.33438 and rustc 1.97.1:
cargo test and cargo test --all-features each passed all 19 tests, including
the behavioral regression. git diff --check passed, and cargo
package --list includes the embedded script. Test-Path returned false without
errors for representative https, mailto, and file URLs. Actual GUI folder,
document, URL handling and WSL interop were not exercised locally.
Commit Statistics
Commit Details
view details
ad95c40)ba35e00)45317f8)v5.4.3Compare Source
Bug Fixes
Commit Statistics
Commit Details
view details
9551952)136d4d0)43e601d)a78c0ca)v5.4.2Compare Source
Bug Fixes
On macOS /usr/bin/open already detaches via LaunchServices. spawn_detached()
adds another fork and leaves zombie children. Align that_detached with
with_detached (PR #119).
Commit Statistics
Commit Details
view details
1a3ef5d)7468760)351bb54)c4369c5)beb6a3f)v5.4.1Compare Source
Bug Fixes
Forward WSL targets to PowerShell to make
openactually work thereOpening a URL from WSL failed because the Windows process did not receive
OPEN_RS_TARGET, even though it was present in the Linux command environment.
The failure reproduces with cargo run -- https://google.com on Ubuntu under
WSL, where Start-Process receives a null FilePath and exits unsuccessfully.
Add OPEN_RS_TARGET to WSLENV so WSL interop forwards the target into the
PowerShell environment. Preserve existing WSLENV entries and their flags,
while keeping the PowerShell command fixed so targets remain data rather than
shell code.
Validated with focused WSL tests, the all-features test suite, rustfmt,
Clippy with warnings denied, and an end-to-end cargo run from WSL.
Commit Statistics
Commit Details
view details
openactually work there (96fa673)e548a4e)v5.4.0Compare Source
New Features
cargo runnow shows the exact commands that were tried when opening.This is useful for debugging, mainly.
Bug Fixes
Align WSL PowerShell invocation with Windows
Pass the WSL open target to PowerShell through the OPEN_RS_TARGET
environment variable instead of embedding it in the command string and
escaping it as a single-quoted PowerShell value.
This matches the safer invocation already used by the native Windows
backend. Keeping the PowerShell program fixed ensures that paths and URLs
are treated purely as data, even when they contain quotes, semicolons, or
other PowerShell metacharacters. It also removes the need for custom
PowerShell quoting and avoids converting the target through
to_string_lossy() during command construction.
Add -NonInteractive for consistency with the Windows launcher and update
the WSL tests to verify both the fixed command and the unchanged
environment-variable value.
prevent launcher option and shell injection
Opening an attacker-controlled dash-leading path could be interpreted as
launcher options. On Windows, cmd /c start also parsed embedded quotes and
metacharacters as command language, while the legacy gnome-open fallback
could load a module even after a double-dash separator.
Add command-construction regressions for malicious option-shaped paths and
Windows shell metacharacters. Use supported separators on macOS and KDE, and
rewrite dash-leading relative paths for launchers without separator support.
Keep Windows values out of shell syntax by passing the default target through
the environment and invoking custom applications directly, with explorer.exe
as a PowerShell-free fallback.
Exclude cmd-based opening by default, while providing an
explicit insecure Cargo feature for users who need compatibility it
and accept their unsafe handling of untrusted input.
Validated with default and all-feature cargo tests, clippy, and cross-target
cargo check --tests for aarch64 Linux and Windows.
Commit Statistics
Commit Details
view details
fd29861)b5c12bd)bdc3397)7265cae)407b058)cargo runnow shows the exact commands that were tried when opening. (7c19c0a)v5.3.6Compare Source
Bug Fixes
use PowerShell instead of wslview on WSL
WSL users reported that wslu's wslview is discontinued and unavailable in
some package managers. The regression tests cover the WSL command builder and
initially failed because the first generated command was still
wslview.Build the WSL opener as a PowerShell
Start-Process -FilePathscript argumentwith the target quoted as data, then retain the xdg-open, gio, gnome-open, and
kde-open fallbacks. Update the user-facing docs and keep the WSL command builder
testable from host builds without adding dev-dependencies.
Commit Statistics
Commit Details
view details
44d1d41)cfb39d8)41c4cf0)v5.3.5Compare Source
Bug Fixes
delegate to winebrowser under Wine
When running a Windows-targeted binary under Wine, open requests previously fell back to Wine's bundled
explorer.exe, which lacks proper host desktop integration.This change detects the Wine environment at runtime (via
WINEPREFIX,WINELOADER, orWINEDEBUG) and prepends a winebrowser command to the launcher list.winebrowseris Wine's official utility for forwarding file/URL requests to the host OS's default handler (e.g.,xdg-openon Linux,openon macOS).If winebrowser is unavailable or fails, the existing
cmd /c startfallback is used automatically, preserving backward compatibility. No public API changes or compile-time flags are introduced.Commit Statistics
Commit Details
view details
b98fc01)bb28d04)f72e644)db81369)v5.3.4Compare Source
Bug Fixes
On macOS, /usr/bin/open is natively detached. This commit changes
with_detached to use the same logic as with() .avoid double detachment to prevent silent failure
Commit Statistics
Thanks Clippy
Clippy helped 1 time to make code idiomatic.
Commit Details
view details
7bd519c)7db5738)8e122d4)20ea175)7faae87)1ab9c47)5604cee)Configuration
📅 Schedule: (in timezone Europe/Berlin)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
4cbcc6fb671fb4a3c7efchore(deps): update rust crate open to v5.3.5 (master)to chore(deps): update rust crate open to v5.3.6 (master)1fb4a3c7ef7869bd6af3chore(deps): update rust crate open to v5.3.6 (master)to chore(deps): update rust crate open to v5.4.0 (master)7869bd6af31f0593925achore(deps): update rust crate open to v5.4.0 (master)to chore(deps): update rust crate open to v5.4.1 (master)1f0593925a94f2c22676chore(deps): update rust crate open to v5.4.1 (master)to chore(deps): update rust crate open to v5.4.2 (master)94f2c226768ab3578075chore(deps): update rust crate open to v5.4.2 (master)to chore(deps): update rust crate open to v5.4.3 (master)8ab3578075372279449bchore(deps): update rust crate open to v5.4.3 (master)to chore(deps): update rust crate open to v5.4.4 (master)372279449b46b39e5b30chore(deps): update rust crate open to v5.4.4 (master)to chore(deps): update rust crate open to v5.4.5 (master)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.