Be able to control Node.js patch version

dane's Avatar

dane

20 Jun, 2014 04:55 PM

Currently you can do:

environment:
  matrix:
    - nodejs_version: 0.8

But not:

environment:
  matrix:
    - nodejs_version: 0.8.26

The error you get is seen at http://help.appveyor.com/discussions/problems/212-how-to-setup-a-no....

Being able to require the patch version and not just the major.minor might see trivial but it's not - it's absolutely essential because the Node.js developers have released a broken node.js v0.8.27 version (https://github.com/joyent/node/issues/7805), which is what is being automatically used on appveyor. I'm open to other ways of working around this problem, but supporting requesting the major.minor.patch seems like the best and most flexible because there are always going to be other reasons why you'd want this.

  1. Support Staff 1 Posted by Feodor Fitsner on 20 Jun, 2014 07:39 PM

    Feodor Fitsner's Avatar

    You may just use "Update-NodeJsInstallation $env:nodejs_version" command to install exact version of node.

    - Feodor

  2. 2 Posted by dane on 20 Jun, 2014 07:43 PM

    dane's Avatar

    Thanks for the reply. However, I'm not following. What you are saying is that 0.8.26 is invalid as a value for the nodejs_version key in the matrix and you recommend just hardcoding it in the call to Update-NodeJsInstallation?

    Did you see the error (here: http://help.appveyor.com/discussions/problems/212-how-to-setup-a-no...) that results when this is used?

     environment:
        matrix:
        - nodejs_version: "0.8.26"
    
  3. 3 Posted by dane on 20 Jun, 2014 07:49 PM

    dane's Avatar

    Oh, maybe what you are saying is to use:

    - ps: Update-NodeJsInstallation $env:nodejs_version $env:Platform
    

    Instead of what I have been using:

    - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:Platform
    

    I've never used powershell so I did not look critically at those commands previously and I've just been copying them around. I gather that Get-NodeJsLatestBuild must be the thing that expects just a major.minor arg?

  4. Support Staff 4 Posted by Feodor Fitsner on 20 Jun, 2014 07:49 PM

    Feodor Fitsner's Avatar

    That error comes from Get-NodeJsLatestBuild function. What I'm suggesting is to don't use this function if you know exact version of node.js that should be installed.

    - Feodor

  5. Support Staff 5 Posted by Feodor Fitsner on 20 Jun, 2014 07:50 PM

    Feodor Fitsner's Avatar

    Exactly.

    - Feodor

  6. 6 Posted by dane on 20 Jun, 2014 07:57 PM

    dane's Avatar

    Thanks, that makes sense. Is there any documentation I'm missing for the Update-NodeJsInstallation and Get-NodeJsLatestBuild functions? For example, do I have it right that Update-NodeJsInstallation takes an optional second argument of the platform (x64 vs x86)? Where can I confirm that I have this right?

  7. Support Staff 7 Posted by Feodor Fitsner on 20 Jun, 2014 08:02 PM

    Feodor Fitsner's Avatar

    Yes, specifying platform is correct and it's optional.

    - Feodor

  8. 8 Posted by dane on 23 Jun, 2014 03:26 AM

    dane's Avatar

    Excellent, thanks, closing this up now!

  9. dane closed this discussion on 23 Jun, 2014 03:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac