Repository navigation
Conversation
arnaudlimbourg
force-pushed
the
fix/nushell-vendor-autoload-detection
branch
from
February 15, 2026 09:32
c4083e1 to
c6895cb
Compare
When `nu` is in PATH, `wt config shell install` now creates the vendor/autoload directory automatically instead of skipping nushell. The directory was introduced in nushell v0.96.0 and isn't always pre-created, causing install to silently skip nushell users. Follows the existing PowerShell pattern: detect the shell binary, then set should_configure and allow_create so the directory gets created on the user's behalf. Co-Authored-By: Claude Opus 4.6 <[email protected]>
arnaudlimbourg
force-pushed
the
fix/nushell-vendor-autoload-detection
branch
from
February 15, 2026 09:35
c6895cb to
d6ca5cc
Compare
Merged
Contributor
Author
|
@max-sixty tested locally, works well |
…ssertion
Move WORKTRUNK_TEST_NUSHELL_ENV alongside WORKTRUNK_TEST_POWERSHELL_ENV in
configure_cli_command for consistency — both are shell detection overrides.
Add negative assertion (!contains("Skipped nu")) to directly test the
failure mode this fix addresses.
Co-Authored-By: Claude <[email protected]>
Owner
|
thank you! (fwiw I was happy to take a pass on this, but didn't finish before I went to bed, thank you for taking it...) |
arnaudlimbourg
added a commit
to arnaudlimbourg/worktrunk
that referenced
this pull request
Feb 15, 2026
When shell integration is installed, nushell config might be in different locations depending on the user's environment: - Installation queries `nu -c "echo $nu.default-config-dir"` → creates file at that path - Runtime check should find it regardless of which path was used Previously, is_shell_configured() only checked the single path returned by nushell_config_dir(). If the `nu` command failed during runtime (PATH issues, timeout, etc.) but succeeded during install, detection would fail. Fix: Return multiple candidate paths for nushell checking: 1. The path from querying nu (if available) 2. XDG_CONFIG_HOME/nushell (if set) 3. ~/.config/nushell (XDG default) 4. ~/Library/Application Support/nushell (macOS) This ensures is_shell_configured() finds the nushell integration file regardless of which path was used during installation, fixing the issue where users got "Cannot change directory — shell integration not installed" despite having successfully configured nushell. Resolves the follow-up issue from PR max-sixty#1032 where nushell detection failed at runtime even after successful installation. Co-Authored-By: Claude Haiku 4.5 <[email protected]>
arnaudlimbourg
added a commit
to arnaudlimbourg/worktrunk
that referenced
this pull request
Feb 15, 2026
When shell integration is installed, nushell config might be in different locations depending on the user's environment: - Installation queries `nu -c "echo $nu.default-config-dir"` → creates file at that path - Runtime check should find it regardless of which path was used Previously, is_shell_configured() only checked the single path returned by nushell_config_dir(). If the `nu` command failed during runtime (PATH issues, timeout, etc.) but succeeded during install, detection would fail. Fix: Return multiple candidate paths for nushell checking: 1. The path from querying nu (if available) 2. XDG_CONFIG_HOME/nushell (if set) 3. ~/.config/nushell (XDG default) 4. ~/Library/Application Support/nushell (macOS) This ensures is_shell_configured() finds the nushell integration file regardless of which path was used during installation, fixing the issue where users got "Cannot change directory — shell integration not installed" despite having successfully configured nushell. Resolves the follow-up issue from PR max-sixty#1032 where nushell detection failed at runtime even after successful installation. Co-Authored-By: Claude Haiku 4.5 <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Feb 15, 2026
* fix(shell): nushell detection checks multiple config paths When shell integration is installed, nushell config might be in different locations depending on the user's environment: - Installation queries `nu -c "echo $nu.default-config-dir"` → creates file at that path - Runtime check should find it regardless of which path was used Previously, is_shell_configured() only checked the single path returned by nushell_config_dir(). If the `nu` command failed during runtime (PATH issues, timeout, etc.) but succeeded during install, detection would fail. Fix: Return multiple candidate paths for nushell checking: 1. The path from querying nu (if available) 2. XDG_CONFIG_HOME/nushell (if set) 3. ~/.config/nushell (XDG default) 4. ~/Library/Application Support/nushell (macOS) This ensures is_shell_configured() finds the nushell integration file regardless of which path was used during installation, fixing the issue where users got "Cannot change directory — shell integration not installed" despite having successfully configured nushell. Resolves the follow-up issue from PR #1032 where nushell detection failed at runtime even after successful installation. Co-Authored-By: Claude Haiku 4.5 <[email protected]> * test(shell): add unit tests for nushell config path resolution Extract parse_nu_config_output and resolve_nushell_config_dir as testable functions to close the codecov/patch coverage gap. The fallback path in resolve_nushell_config_dir was only covered locally (no nu binary) but not in CI (where nu is installed), causing the patch check to fail. Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Haiku 4.5 <[email protected]>
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.
When
nuis in PATH,wt config shell installnow creates the vendor/autoload directory automatically instead of skipping nushell. The directory was introduced in nushell v0.96.0 and isn't always pre-created, causing install to silently skip nushell users.Follows the existing PowerShell pattern: detect the shell binary, then set should_configure and allow_create so the directory gets created on the user's behalf.
This fixes issue reported in #964 about installation being skipped on nushell