purescript / psc-package

A package manager for PureScript based on package sets
https://psc-package.readthedocs.io
Other
229 stars 45 forks source link

Cannot find purs executable on Windows #34

Closed ricksanchez closed 5 years ago

ricksanchez commented 7 years ago

purs is an available command in my terminal and pulp doesn't have any problem to find it, however psc-package cannot find it:

psc-package.exe: purs: createProcess: does not exist (No such file or directory).

In PowerShell:

> .\psc-package init
hdgarrood commented 7 years ago

FWIW the new psc-package tests for Pulp don't seem to have this problem on Pulp's Windows CI (although they're not quite passing yet), so I don't think this is entirely to do with Windows. @ricksanchez could you possibly try to narrow down what might be going on, or guess why this might not be happening on AppVeyor but is happening on on your machine? See: https://ci.appveyor.com/project/bodil/pulp/build/1.0.520

ricksanchez commented 7 years ago

Well, I don't see a direct usage of psc-package in that script, it seems to be related to pulp instead of psc-package. I forgot to mention, that I executed "psc-package init", following the "How to". I will add it to the description

hdgarrood commented 7 years ago

Yes, but pulp does use psc-package in those tests. Although come to think of it I think it only uses psc-package sources, which might not require purs.

kofno commented 7 years ago

I had this problem last night. I fixed it by putting purs.exe on the path ahead of my npm installed purescript.

I think the problem is that inproc "purs" finds the purs shell script on the path, but we probably want it to be calling the purs.cmd instead. I haven't had a chance to test that theory yet.

kofno commented 7 years ago

I have the psc-package source on my windows machine. Maybe I could take a crack at a PR.

cebaa commented 7 years ago

As a side note, the same thing happens when using Cygwin:

$ psc-package init
Initializing new project in current directory
psc-package.exe: purs: createProcess: does not exist (No such file or directory)

In this case, it should probably not be using purs.cmd, but purs, which is also a script, but I guess better suited for Linux-like environments.

justinwoo commented 5 years ago

I believe this is now fixed for users who install from chocolatey and from the npm package, which now uses https://github.com/justinwoo/npm-psc-package-bin-simple