Skip to content

fix: Preserve symlinked manifest paths#4912

Merged
baszalmstra merged 4 commits intoprefix-dev:mainfrom
claydugo:preserve_symlink_manifest_path
Nov 21, 2025
Merged

fix: Preserve symlinked manifest paths#4912
baszalmstra merged 4 commits intoprefix-dev:mainfrom
claydugo:preserve_symlink_manifest_path

Conversation

@claydugo
Copy link
Contributor

Description

This PR fixes an issue where pixi resolves symlinked pixi.toml files to their real location, causing the .pixi/ directory to be created relative to the symlink target instead of the symlink itself. This broke common dotfiles management workflows where users symlink config files from a git repository to their home directory.

Fixes #4907

How Has This Been Tested?

Test was added to crates/pixi_manifest/src/manifests/provenance.rs and I tested the described workflow locally with the generated binary.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude Code with body of issue I wrote

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added sufficient tests to cover my changes.

@claydugo claydugo marked this pull request as ready for review November 11, 2025 18:12
@lucascolley lucascolley added the bug Something isn't working label Nov 16, 2025
@baszalmstra baszalmstra enabled auto-merge (squash) November 21, 2025 13:03
@baszalmstra baszalmstra merged commit f8035fd into prefix-dev:main Nov 21, 2025
38 checks passed
@baszalmstra
Copy link
Contributor

Thanks!

claydugo added a commit to claydugo/pixi that referenced this pull request Dec 4, 2025
…mlinks

The fix in prefix-dev#4912 for symlinked manifest paths was incomplete. While
ManifestProvenance::absolute_path() correctly preserves symlinks by
only canonicalizing the parent directory, the Workspace::from_manifests()
function was re-canonicalizing the entire manifest path, which resolved
the symlink and caused the .pixi directory to be created in the wrong
location.

This change uses absolute_path() instead of dunce::canonicalize() when
computing the workspace root, ensuring that symlinked pixi.toml files
work correctly in dotfiles workflows.

Fixes the remaining issue from prefix-dev#4907.
claydugo added a commit to claydugo/pixi that referenced this pull request Dec 4, 2025
…mlinks

The fix in prefix-dev#4912 for symlinked manifest paths was incomplete. While
ManifestProvenance::absolute_path() correctly preserves symlinks by
only canonicalizing the parent directory, the Workspace::from_manifests()
function was re-canonicalizing the entire manifest path, which resolved
the symlink and caused the .pixi directory to be created in the wrong
location.

This change uses absolute_path() instead of dunce::canonicalize() when
computing the workspace root, ensuring that symlinked pixi.toml files
work correctly in dotfiles workflows.

Fixes the remaining issue from prefix-dev#4907.

fixup
claydugo added a commit to claydugo/pixi that referenced this pull request Dec 4, 2025
…mlinks

The fix in prefix-dev#4912 for symlinked manifest paths was incomplete. While
ManifestProvenance::absolute_path() correctly preserves symlinks by
only canonicalizing the parent directory, the Workspace::from_manifests()
function was re-canonicalizing the entire manifest path, which resolved
the symlink and caused the .pixi directory to be created in the wrong
location.

This change uses absolute_path() instead of dunce::canonicalize() when
computing the workspace root, ensuring that symlinked pixi.toml files
work correctly in dotfiles workflows.

Fixes the remaining issue from prefix-dev#4907.

fixup

lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support dotfiles workflow: respect symlink location for environment paths

3 participants