Closed Samsinite closed 5 years ago
Looking at my path, this seems like an issue with pulp being unable to handle a shim to run purs
:
Samuels-MacBook-Pro:chapter-three samueljclopton$ echo $PATH
/Users/samueljclopton/.volta/bin:/Users/samueljclopton/.cargo/bin:/Users/samueljclopton/.rbenv/shims:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/samueljclopton/Library/Android/sdk/tools:/Users/samueljclopton/Library/Android/sdk/tools/bin:/Users/samueljclopton/Library/Android/sdk/platform-tools:/Users/samueljclopton/Library/Android/sdk/tools:/Users/samueljclopton/bin:/Applications/Postgres.app/Contents/Versions/10/bin
Then printing the path of the volta shims:
Samuels-MacBook-Pro:chapter-three samueljclopton$ ls -la /Users/samueljclopton/.volta/bin
total 0
drwxr-xr-x 10 samueljclopton staff 320 Sep 18 13:03 .
drwxr-xr-x 11 samueljclopton staff 352 Sep 18 13:03 ..
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 bower -> /Users/samueljclopton/.volta/shim
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 ember -> /Users/samueljclopton/.volta/shim
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 node -> /Users/samueljclopton/.volta/shim
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 npm -> /Users/samueljclopton/.volta/shim
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 npx -> /Users/samueljclopton/.volta/shim
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 pulp -> /Users/samueljclopton/.volta/shim
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 purs -> /Users/samueljclopton/.volta/shim
lrwxr-xr-x 1 samueljclopton staff 33 Sep 18 13:03 yarn -> /Users/samueljclopton/.volta/shim
Pulp isn't doing anything weird here, it just uses the purs
it finds on your PATH
. I'm not sure why it isn't working. pulp init
works for me when the first purs
in my path is a symbolic link which points to the actual executable. Can you maybe try to find out what it is about the shim which is breaking this?
Installing the purs
binary in my path instead of through worked once I symlink'd to bower
ahead of the volta shim in my path. Seems like an error with pulp not recognizing a shim'd binary named bower
and purs
already in my path (which calls the designated purs
/bower
binary based off of package.json
priorities).
@hdgarrood If you take a closer look at https://github.com/purescript-contrib/pulp/issues/386#issuecomment-532845651, then you can see that it isn't using the purs
binary in my path.
Yes, I can see that, but I want to understand what is different about your setup; pulp
does use the purs
in my PATH, even when that purs
is a symbolic link.
The difference is that purs
is symlinked to the executable /Users/samueljclopton/.volta/shim
which calls the correct purs
version based off of its resoltion algorithm.
What I'm really asking is can you come up with a repro case which doesn't involve volta
.
Hmm... I think this is a volta issue then, it seems to work when I install a simple bash shim:
purs
#!/bin/bash
/Users/samueljclopton/.volta/tools/image/packages/purescript/0.13.3/purs.bin "$@"
I'll close and open an issue there, thanks for the help!
Good luck, sorry I couldn't be of more help.
No worries, a direct symlink will work for now until volta can fix it :)
A little background incase you are unfamiliar with Volta. Volta is a node and JavaScript command-line tools version manager. After installing
purescript
,bower
, andpulp
via volta, runningpulp init
fails:Not sure if this issue belongs here or inside of the volta respository.