Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pixi global exposed doesn't work with nested paths #2350

Open
2 tasks done
bahugo opened this issue Oct 25, 2024 · 5 comments · May be fixed by #2362
Open
2 tasks done

pixi global exposed doesn't work with nested paths #2350

bahugo opened this issue Oct 25, 2024 · 5 comments · May be fixed by #2362
Labels
✨ enhancement Feature request

Comments

@bahugo
Copy link
Contributor

bahugo commented Oct 25, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

pixi global install dotnet  --expose "dotnet=dotnet"
pixi global install dotnet  --expose "dotnet=dotnet/dotnet"

Issue description

Dotnet installs its executable in a nested directory

%USERPROFILE%\.pixi\envs\dotnet\dotnet\dotnet.exe

When i run pixi global install dotnet pixi can't find the executable.
I tried this workaround pixi global install dotnet --expose "dotnet=dotnet/dotnet"
But it fails too :

  × Couldn't install packages. Reverting also failed.
  ├─▶ Failed to add executables for environment: dotnet
  ╰─▶ Couldn't find executable dotnet in C:\Users\bahugo\.pixi\envs\dotnet, found these executables: []

Expected behavior

It would be perfect if pixi search for executable recursively, or at least if we could specify a nested path.

@Hofer-Julian Hofer-Julian added the ✨ enhancement Feature request label Oct 25, 2024
@Hofer-Julian
Copy link
Contributor

Specifying a nested path sounds good to me.

I am thinking of the following behavior:

  • without a path separator in the string -> search for executable in the typical directories with all possible file extensions
pixi global install python=3.9 --expose=python3.9=python
  • with path separator -> we expect the relative path to the env root. The extension would have to be mentioned in that case
pixi global install dotnet  --expose "dotnet=lib\dotnet\dotnet.exe"

@bahugo
Copy link
Contributor Author

bahugo commented Oct 25, 2024

Thank you for your answer, unfortunately I tried before but it fails too.

pixi global install dotnet  --expose "dotnet=dotnet\dotnet.exe"

returns :

× Couldn't install packages. Reverting also failed.
  ├─▶ Failed to add executables for environment: dotnet
  ╰─▶ Couldn't find executable dotnet in C:\Users\bahugo\.pixi\envs\dotnet, found these executables: []

dotnet executable is not in lib directory, it's located here :
Image

@Hofer-Julian
Copy link
Contributor

Yes @bahugo, I was outlining a possible implementation. Sorry if that wasn't clear.

@Hofer-Julian
Copy link
Contributor

@ruben-arts suggested to never specify the file extension, even for nested paths.

@bahugo
Copy link
Contributor Author

bahugo commented Oct 25, 2024

@Hofer-Julian, my bad, I read to fast...
It sounds great to me.

@bahugo bahugo linked a pull request Oct 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants