Hi,
I'm trying to install choosenim on a custom folder in order to avoid my (corporate) antivirus from deleting some of its executables. I have been reporting the false positives to our antivirus vendor, but while it seems to help a bit, whenever I update choosenim again the problems seem to come back.
I spoke with my IT department, and they told me that if I installed choosenim in a specific folder (which could unfortunately cannot be the default ~/.choosenim and ~/.nimble) they could whitelist them.
Thus that is what I am trying to do but it does not seem to work. I edited runme.bat as follows:
.choosenimchoosenim.exe stable --firstInstall --choosenimDir:C:MY_CUSTOM_FOLDER.choosenim --nimbleDir:C:MY_CUSTOM_FOLDER.nimble
This does install choosenim there and even adds it to the path. However, as soon as I run choosenim again (without those arguments) choosenim seems to install itself in the default folder (creating ~.choosenim and ~.nimble).
Am I doing something wrong?
BTW, assuming this can be fixed, it would be nice if you could pass an (optional) path to runme.bat, so that the installation was done on that particular path.
Am I doing something wrong?
If you have installed choosenim in a custom directory, You always have to pass the '--choosenimDir' param. If not choosenim won't guess where you want it to work. Then it will return to default dir. That's why choosenim is reinstalling itself over and over in ~.choosenim
and even adds it to the path
The fact that your custom dir has been added to the path only means that the system can run the programs inside it. Choosenim doesn't refer to that information.
On Linux, to add automatically --choosenimDir and ` --nimbleDir`, you could simply create a command alias or a shebang script. There should be something similar on windows.
I really encourage you to switch to linux.
It is not an option for me to switch to Linux in my work laptop, specially given that we develop Windows software :)
It seems to me that choosenim should remember / detect that it’s installed in a custom folder. Having to type the choosenim and nimble paths every time is not para ti al and very error prone.
@archnim, I appreciate the offer but this is a work issued laptop. Unfortunately I cannot uninstall Windows and install another OS, even if I wanted to. The most I can do is install (and use) WSL, which I already do as much as possible. That however does not solve the issue I’ve got.
@PMunch, while I could probably create some script to always call choose I’m with the right arguments, I feels a bit silly that choosenim supports running from a non standard location yet it makes it relatively difficult to do so. It seems it should be relatively simple for choosenim to either:
Or:
@dom96, what do you think?
Yes, choosenim could be smarter here. Nimble has a configuration mechanism where it reads a nimble.ini file from the system's default config dir (~/.config/nimble on linux iirc). We could have choosenim do the same, but I don't think it's necessary.
I think a better solution is to have choosenim read a CHOOSENIM_DIR env var, and if its set override the choosenim dir that way. The same for NIMBLE_DIR and Nimble already reads this (so choosenim does too, it reuses Nimble's logic for this). If you're up for it, this should be a simple PR for choosenim :)