Today I installed purescript for the first time. Then found the executable file was “purs.bin”, which can’t be executed on my Windows without adding “bin” to PATHEXT.
I’m not against modifying PATHEXT, but why is the extension “.bin”?
Is that a common extension for executable files?
How did you install purescript? I don’t think adding “bin” to your PATHEXT should be necessary.
By npm i -g purescript
on my PowerShell Core 6.2.0.
I confirmed cmd.exe can run purs --help
successfully. So it looks like a problem specific to PowerShell. Should I file an issue?
That’s interesting - I wouldn’t have thought you would have to do anything to get this to work, since when you npm i -g
it creates a purs.cmd
(or purs.ps1
I assume, if you’re using powershell) in %APPDATA%\npm
(should already be on your PATH) which the compiler is launched through.
Yeah, purs.ps1
was actually created, but the purs.ps1
internally calls purs.bin
, which results in showing the dialog to choose the app to open purs.bin
with.
Ah right, I see! Hmm, it’s odd we’ve not had a report of this before.
@kritzcreek - you use PS sometimes right? Do you have purs
installed on there, and did you have to do anything to get it to work?
You meant mentioning me? Unfortunately this is the first time I installed purescript…
Oh, and I’ve found this problem isn’t reproduced on my personal desktop.
So this problem seems specific to my laptop owned by my company. But I’m not sure which difference caused that…
No, I was pinging Christoph in particular as he’s the only other PowerShell user I know
(FWIW, I use PowerShell a lot, and have never experienced an issue like this)
Hmm I don’t think I’ve ever run into this… Could be some security policy interfering with executing the Powershell Script.
I confirmed we can avoid the problem by adding .BIN
to PATHEXT
.
Thank you for your help! (I was too busy by today.)