Skip to content

fix improper cant convert error in path-relative-to - #18792

Merged
fdncred merged 1 commit into
nushell:mainfrom
pheenty:fix/cantconvert
Sep 2, 2026
Merged

fdncred merged 1 commit into
nushell:mainfrom
pheenty:fix/cantconvert

Conversation

@pheenty

@pheenty pheenty commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Then:

  × Can't convert to prefix not found.
   ╭─[repl_entry #11:1:1]
 1 │ "/home/pheenty/" | path relative-to "/home/pheenty/git"
   · ────────┬───────
   ·         ╰── can't convert string to prefix not found

Now:

  × The argument path is not a parent of the input path.
   ╭─[repl_entry #1:1:1]
 1 │ "/home/pheenty/" | path relative-to "/home/pheenty/git"
   · ────────┬───────
   ·         ╰── prefix not found

Also changed two huge and almost identical #[cfg(windows)] and #[cfg(not(windows))] code blocks to just have three if cfg!(windows) inside while at was at it

User-facing changes (Release notes)

Fixed path relative-to providing improper error messages when its argument was not a parent of the input.

@fdncred
fdncred merged commit fcd415d into nushell:main Sep 2, 2026
15 checks passed
@fdncred

fdncred commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Thanks

@github-actions github-actions Bot added this to the v0.116.0 milestone Sep 2, 2026
@pheenty
pheenty deleted the fix/cantconvert branch September 2, 2026 14:20
@fdncred fdncred added notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants