worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

Installs Nushell scripts to wrong vendor autoload path on Windows

Open deltoss opened this issue 8 months ago • 2 comments

Version: wt v0.28.2 Platform: Windows 11

Description:

Running git-wt config shell install on Windows installs the Nushell integration script to the Linux/macOS vendor autoload path: ~/.config/nushell/vendor/autoload/git-wt.nu However, Windows uses a different path for Nushell vendor autoloading: ~\AppData\Roaming\nushell\vendor\autoload\git-wt.nu

Because the script is placed in the wrong location, it is never picked up by Nushell on startup, so the git-wt shell integration silently fails.

Image

I did find a workaround where I source the git-wt.nu script directly in my nushell profile, but it'd be good if this step isn't needed.

deltoss avatar Mar 05 '26 23:03 deltoss

Thanks for reporting this! I was able to identify the root cause: nushell_config_candidates() in src/shell/paths.rs had a macOS-specific fallback path (~/Library/Application Support/nushell) but no Windows equivalent, so Windows always fell back to the hardcoded ~/.config/nushell XDG default — which Nushell on Windows doesn't use for vendor autoload.

I've opened #1294 with a fix that replaces the platform-specific fallback with etcetera's choose_base_strategy().config_dir(), which resolves to the correct config directory on all platforms (including AppData/Roaming on Windows). A maintainer will review it shortly.

worktrunk-bot avatar Mar 06 '26 00:03 worktrunk-bot

thanks a lot @deltoss ! will fix

max-sixty avatar Mar 06 '26 00:03 max-sixty