-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nodist looks good, one tweak for powershell users #23
Conversation
add note for powershell users
@@ -9,6 +9,7 @@ Don't install node beforehand! | |||
2. When you've got the code, add `...path...\nodist\bin` to your path ([how?](http://www.computerhope.com/issues/ch000549.htm)). | |||
|
|||
3. Now, run `nodist update`, which will install the dependencies. | |||
* From powershell, use cmd /c "nodist update" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really necessary? I think it works fine for me...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Marcel, I looked into the "cmd /c" thing a bit more. It turns out the
reason it was needed for me was because my nodist path was "C:\Program
Files (x86)\nodist". If I put the files somewhere else (like
C:\src\nodist) it works. Maybe the .CMD can be updated to handle this
better? I replaced the note in the readme, though it would be better to
update the .CMD file I do not know how to do that.
I could make an attempt at adding support for reading .nodeversion file,
but I haven't been able to figure out how to run the existing tests. Node
is new to me, so if there is some convention I'm missing it.
My console output from the cmd issue wais:
C:\Program Files (x86)> nodist update
\nodist\bin\nodist.cmd"" was unexpected at this time.
C:\Program Files (x86)> get-command nodist | select path
Path
----
C:\Program Files (x86)\nodist\bin\nodist.cmd
On Wed, May 15, 2013 at 5:17 AM, Marcel Klehr notifications@github.comwrote:
In README.md:
@@ -9,6 +9,7 @@ Don't install node beforehand!
- When you've got the code, add
...path...\nodist\bin
to your path (how?).- Now, run
nodist update
, which will install the dependencies.
- * From powershell, use cmd /c "nodist update"
is this really necessary? I think it works fine for me...
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/23/files#r4233332
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah. the space in path bug again...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the bright side, if someone installs via chocolatey then the path will
not have a space. I tried to put together a package (learning chocolatey
too...), it worked on my last attempt:
https://github.com/fschwiet/nodist/blob/chocolatey/chocolatey/tools/chocolateyInstall.ps1
Still experimental, to use it, install chocolatey (http://chocolatey.org/)
then build/install the package:
c:\nodist\chocolately> cpack
c:\nodist\chocolately> cinst nodist -source c:\nodist\chocolately
On Wed, May 15, 2013 at 12:15 PM, Marcel Klehr notifications@github.comwrote:
In README.md:
@@ -9,6 +9,7 @@ Don't install node beforehand!
- When you've got the code, add
...path...\nodist\bin
to your path (how?).- Now, run
nodist update
, which will install the dependencies.
- * From powershell, use cmd /c "nodist update"
ah. the space in path bug again...
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/23/files#r4241931
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up uploading the chocolatey package to the official gallery:
http://chocolatey.org/packages/nodist. Its marked as prerelease now
though, so people will recognize its perhaps not done. It seems to work
well though, I've ran it on a few VMs now successfully.
On Wed, May 15, 2013 at 2:16 PM, Frank Schwieterman fschwiet@gmail.comwrote:
On the bright side, if someone installs via chocolatey then the path
will not have a space. I tried to put together a package (learning
chocolatey too...), it worked on my last attempt:
https://github.com/fschwiet/nodist/blob/chocolatey/chocolatey/tools/chocolateyInstall.ps1Still experimental, to use it, install chocolatey (
http://chocolatey.org/) then build/install the package:
c:\nodist\chocolately> cpack
c:\nodist\chocolately> cinst nodist -source c:\nodist\chocolatelyOn Wed, May 15, 2013 at 12:15 PM, Marcel Klehr notifications@github.comwrote:
In README.md:
@@ -9,6 +9,7 @@ Don't install node beforehand!
- When you've got the code, add
...path...\nodist\bin
to your path (how?).- Now, run
nodist update
, which will install the dependencies.
- * From powershell, use cmd /c "nodist update"
ah. the space in path bug again...
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/23/files#r4241931
.
Nobody's working on anything right now, afaik. .node-version files and package.json version detection sounds interesting. So does a chocolatey installer, although I'm not aware of how much work that'd be. Help is always appreciated :) |
Conflicts: chocolatey/nodist.nuspec
Conflicts: .gitignore
…ng this isn't really possible to implement as I'd anticipated
Mh. It doesn't seem to add any commands to chocolatey/bin, though. chocInstall.ps1 should probably add nodist/bin to the path, no? And how can I stop chocolatey from detecting the node.exe in nodist's root? |
I tried to repro this on a clean machine. I wish I took better notes as I thought I had a repro, as after rebooting the problem went away. What I recall observing was that there was a node command accessible, but not a nodist command. After rebooting this (I assume the reboot changed things) I have both a node and nodist command available from cmd or powershell prompt. After rebooting, the node and nodist commands are being found where the files were unpacked:
The chocolatey package is adding that to the path at the machine level from https://github.com/marcelklehr/nodist/blob/master/chocolatey/tools/chocolateyInstall.ps1 with "Install-ChocolateyPath $binPath 'Machine'". My hypothesis is that the machine-level path update isn't kicking until after the reboot for some reason. I'm not sure what the appropriate fix would be. We could try to fix the path inclusion of C:\Chocolatey\lib\nodist.0.3.12-beta\tools\nodist-master\bin perhaps by making the change to the user environment variable (instead of system level, as it does now). Or we could try to get a nodist.bat file created at c:\chocolatey\bin. I think using c:\chocolatey\bin is the Right Way to do it, and I was probably doing the wrong thing when trying to modify path variables before. That said, I have no idea what part of the chocolatey script is creating the node.bat file. I suspect chocolatey is scanning for .exe files automatically and creating a .bat for it automatically. Still thinking about this. Saving my notes for now. Here is the console results of the original chocolatey install:
|
There is a note about .batch file redirects here: https://github.com/chocolatey/chocolatey/wiki/CreatePackages I suspect we may need to add a "node.exe.ignore" file for the node.exe in tools\nodist-master, and manually create batch redirects for node and nodist in tools\nodist-master\bin. I'm going to ask the chocolatey forum if there is a correct way to create batch redirects. |
I asked my question on the chocolatey discussion alias, here: https://groups.google.com/forum/#!topic/chocolatey/U80l-Oy3nXw |
I am learning node.js, but as I try to deploy node.js to windows nodist has been really helpful.
I had two questions:
I could help with these, but before I dug in I wanted to check if someone else was working on them. Also since I am new node.js, I'd appreciate your feedback on whether they make sense to do.