Skip to content

Releases: Byron/open-rs

v5.4.5

Choose a tag to compare

@Byron Byron released this 22 Oct 03:52
a60a9d5

Bug Fixes

  • check that_detached launchers for immediate failures
    that_detached() returned as soon as a launcher spawned, so a launcher that
    failed 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 within
    that window falls through to the next candidate; one still running is treated
    as handed off. The macOS and shellexecute-on-windows paths are unchanged.

    Extend the fixture tests to call that_detached() directly.

  • restore launcher fallback and support Plasma 6

    When xdg-open starts but exits unsuccessfully, that() and the CLI
    previously stopped before trying another installed opener. On Plasma 6,
    the fallback list also omitted the versioned KDE launchers.

    Launcher behavior

    • Retry reported failures from UNIX desktop launchers and retain the first
      unsuccessful exit when later candidates are missing.
    • Add kde-open6 and kde-open5 before the existing kde-open fallback.
    • Keep launcher ordering, argument boundaries, and exit-status policy
      together so compatibility decisions are explicit.
    • Preserve Windows' stop-on-failure policy and the existing protections
      for option-shaped and non-UTF-8 paths.

    Bounded detached checks

    Add that_detached_with_timeout(path, timeout) to opt into checking the
    actual 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 a
    background 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-windows is enabled.

    Historical constraints

    55dc10d relaxed exit checks for argumentless availability probes, where
    usage errors are expected. It did not establish that failed real opening
    operations should stop fallback. 245c95e introduced that behavior;
    the earlier implementation retried unsuccessful operations.

    Keep stderr redirected to null: 30a144a and 0bdc6d6 document previous
    pipe 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. Exclude kioclient exec, which enables execution
    beyond kde-open's behavior, and arbitrary file-manager or AppImage
    environment fallbacks that could override configured handlers.

    Validation and limits

    • Default and all-feature Linux tests pass, covering fallback, error
      selection, Plasma 6 reachability, timeouts, child reaping, survival after
      caller exit, large stderr output, argument protection, and CLI behavior.
    • Formatting, git diff --check, and all-target, all-feature Linux clippy
      pass. Windows and macOS compile checks and clippy also pass.
    • Actual desktop and AppImage behavior still needs testing. A handler
      that opens a target before reporting failure can cause a duplicate open
      when retried. Failures after the timeout cannot trigger fallback.

Commit Statistics

  • 4 commits contributed to the release.
  • 42 days passed between releases.
  • 2 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #135 from Byron/fix-linux-launchers (4e64f6b)
    • Auto-review (c88759b)
    • Check that_detached launchers for immediate failures (42a34b0)
    • Restore launcher fallback and support Plasma 6 (279c1b2)

v5.4.4

Choose a tag to compare

@Byron Byron released this 10 Sep 04:08
ba35e00

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. No
    previously 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

  • 2 commits contributed to the release.
  • 8 days passed between releases.
  • 1 commit was understood as conventional.
  • 1 unique issue was worked on: #132

Commit Details

view details
  • #132
    • Open Windows paths without wildcard expansion (ad95c40)
  • Uncategorized
    • Merge pull request #133 from Byron/fix-open-on-windows (45317f8)

v5.4.3

Choose a tag to compare

@Byron Byron released this 02 Sep 03:26
9551952

Bug Fixes

  • wait for intermediate child to terminate when double-forking

Commit Statistics

  • 3 commits contributed to the release.
  • 9 days passed between releases.
  • 1 commit was understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #131 from ncfavier/reap (136d4d0)
    • Review (43e601d)
    • Wait for intermediate child to terminate when double-forking (a78c0ca)

v5.4.2

Choose a tag to compare

@Byron Byron released this 24 Aug 09:07
1a3ef5d

Bug Fixes

  • wait in that_detached instead of double-fork
    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

  • 4 commits contributed to the release over the course of 18 calendar days.
  • 19 days passed between releases.
  • 1 commit was understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #130 from s00d/fix/macos-that-detached-zombies (7468760)
    • Review (351bb54)
    • Wait in that_detached instead of double-fork (c4369c5)
    • Merge pull request #129 from Byron/fix-wsl (beb6a3f)

v5.4.1

Choose a tag to compare

@Byron Byron released this 05 Aug 15:21
e548a4e

Bug Fixes

  • Forward WSL targets to PowerShell to make open actually work there

    Opening 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

  • 1 commit contributed to the release.
  • 24 days passed between releases.
  • 1 commit was understood as conventional.
  • 1 unique issue was worked on: #128

Commit Details

view details
  • #128
    • Forward WSL targets to PowerShell to make open actually work there (96fa673)

v5.4.0

Choose a tag to compare

@Byron Byron released this 12 Jul 08:11
b5c12bd

New Features

  • cargo run now 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

  • 5 commits contributed to the release.
  • 3 commits were understood as conventional.
  • 1 unique issue was worked on: #124

Commit Details

view details
  • #124
    • Prevent launcher option and shell injection (fd29861)
  • Uncategorized
    • Merge pull request #126 from Byron/fix-wsl (bdc3397)
    • Align WSL PowerShell invocation with Windows (7265cae)
    • Merge pull request #125 from Byron/open-with-dash-dash (407b058)
    • cargo run now shows the exact commands that were tried when opening. (7c19c0a)

v5.3.6

Choose a tag to compare

@Byron Byron released this 29 Jun 09:30
cfb39d8

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 -FilePath script argument
    with 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

  • 2 commits contributed to the release.
  • 48 days passed between releases.
  • 1 commit was understood as conventional.
  • 1 unique issue was worked on: #122

Commit Details

view details
  • #122
    • Use PowerShell instead of wslview on WSL (44d1d41)
  • Uncategorized
    • Merge pull request #123 from Byron/avoid-wslview (41c4cf0)

v5.3.5

Choose a tag to compare

@Byron Byron released this 11 May 22:25
b98fc01

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, or WINEDEBUG) and prepends a winebrowser command to the launcher list. winebrowser is Wine's official utility for forwarding file/URL requests to the host OS's default handler (e.g., xdg-open on Linux, open on macOS).

    If winebrowser is unavailable or fails, the existing cmd /c start fallback is used automatically, preserving backward compatibility. No public API changes or compile-time flags are introduced.

Commit Statistics

  • 3 commits contributed to the release.
  • 22 days passed between releases.
  • 1 commit was understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #121 from gsurrel/wine-awareness (bb28d04)
    • Review (f72e644)
    • Delegate to winebrowser under Wine (db81369)

v5.3.4

Choose a tag to compare

@Byron Byron released this 19 Apr 04:58
7bd519c

Bug Fixes

  • align with_detached() implementation with with()
    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

  • 6 commits contributed to the release.
  • 1 commit was understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Thanks Clippy

Clippy helped 1 time to make code idiomatic.

Commit Details

view details
  • Uncategorized
    • Merge pull request #119 from benzeneringlq/fix-macos-detach-silent-failure (7db5738)
    • Align with_detached() implementation with with() (8e122d4)
    • Merge pull request #117 from ChrisDenton/absolute (20ea175)
    • Thanks clippy (on Windows) (7faae87)
    • Enable clippy deny on CI, with all features, but allow incompatible MRSV there (1ab9c47)
    • Use absolute instead of canonicalize (5604cee)

v5.3.3

Choose a tag to compare

@Byron Byron released this 17 Nov 19:56
ab1b306

Documentation

  • point to webbrowser crate for users that seek this specific functionality.

Bug Fixes

  • pass canonicalized path to ILCreateFromPathW

Other

  • remove whitespace.

Commit Statistics

  • 8 commits contributed to the release.
  • 316 days passed between releases.
  • 3 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #116 from Legend-Master/canonicalize-ILCreateFromPathW (a1ca334)
    • Fix CI by using a more recent Windows image (c84cade)
    • Pass canonicalized path to ILCreateFromPathW (abcd0f4)
    • Merge pull request #111 from bjones1/docs (335146b)
    • Remove whitespace. (314d80a)
    • Point to webbrowser crate for users that seek this specific functionality. (07b246c)
    • Merge pull request #110 from bjones1/codespaces (1c4a952)
    • Add Codespaces setup. (43b6a2d)