Why not "purs.exe" instead of "purs.bin"?

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?

2 Likes

How did you install purescript? I don’t think adding “bin” to your PATHEXT should be necessary.

1 Like

By npm i -g purescript on my PowerShell Core 6.2.0.

1 Like

I confirmed cmd.exe can run purs --help successfully. So it looks like a problem specific to PowerShell. Should I file an issue?

1 Like

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.

1 Like

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.

1 Like

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?

1 Like

You meant mentioning me? Unfortunately this is the first time I installed purescript…

1 Like

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 :smile:

2 Likes

(FWIW, I use PowerShell a lot, and have never experienced an issue like this)

2 Likes

Hmm I don’t think I’ve ever run into this… Could be some security policy interfering with executing the Powershell Script.

2 Likes

I confirmed we can avoid the problem by adding .BIN to PATHEXT.
Thank you for your help! (I was too busy by today.)

2 Likes