elixir-lang/elixir-windows-setup

Add %UserProfile%\.mix\escripts to PATH after installation

josevalim opened this issue · 7 comments

Hi @chyndman!

With Elixir v1.3, we will support installation of escripts and they can be invoked from PATH. Do you think it would be possible to change the installer to also add %UserProfile%\.mix\escripts to the path if none exists?

There is absolutely no rush on this feature. I think we need to do a new signed released in a couple months when the key expires, we could probably fix this by then.

Thank you! ❤️

The certificate expires around July 20th, so I can definitely look into adding this option by then. But I want to make sure I know what this does; if I understand escripts correctly, they're like other scripts with shebangs and thus can't be run directly on a Windows command prompt, so it may not be worthwhile to add this folder to PATH.

@chyndman on Elixir master we automatically add a .bat file to this directory that properly invokes the escript. I have tested on a Windows Vista I have laying around and it works great. Here is the relevant commit: elixir-lang/elixir@5181b20 :)

See v1.10 which adds this feature. /cc @josevalim

@josevalim The installer will present this option for all versions of Elixir. If you'd like to restrict it to newer versions, change the windows_installer_compat field in the elixir.csv file from 1 to 1e, and I then I can implement a check to parse out the e to enable this option.

EDIT: do NOT change the file yet; the installer will fail until I implement this mask.

We can always add this path, even for old versions, it is alright. :)

On Friday, June 3, 2016, Chris Hyndman notifications@github.com wrote:

@josevalim https://github.com/josevalim The installer will present this
option for all versions of Elixir. If you'd like to restrict it to newer
versions, change the windows_installer_compat field in the elixir.csv file
from 1 to 1e, and I then I can implement a check to parse out the e to
enable this option.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAAlbu8DlBIEC-N8atzFSR_H0YLDXTMvks5qIHqpgaJpZM4HkyC8
.

José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

@chyndman don't worry about this. We can propose to add the path even on older versions. Nothing wrong will come out of it and it is most likely people will be installing the latest anyway.

I think adding %UserProfile%.mix\escripts to the system environment PATH variable doesn't work, since it's expanded to
C:\WINDOWS\system32\config\systemprofile\.mix\escripts
and not to
MyUserHome\.mix\escripts
I think it should be added to the user environment PATH variable. See https://superuser.com/questions/442158/why-cant-i-use-userprofile-in-path