Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

Incorrect architecture check (x86|x64) #10

Closed
LodewijkSioen opened this issue Feb 4, 2015 · 4 comments
Closed

Incorrect architecture check (x86|x64) #10

LodewijkSioen opened this issue Feb 4, 2015 · 4 comments

Comments

@LodewijkSioen
Copy link

It's not you, it's node.

Long story short: os.arch doesn't report the architecture of the processor, but the architecture node runs in. So if you're running node for x86 on an x64 system, os.arch will report ia32. This was the case for my (appveyor)[http://www.appveyor.com] build.

You can fix this by not using os.arch, but by checking for the existence of the c:\Program Files (x86)\ directory. If it exists, you'll need to look for MsBuild there, otherwise it'll be in c:\Program Files\.

You can use the same check to switch between Framework and Framework64

@hoffi
Copy link
Owner

hoffi commented Feb 4, 2015

Hm interesting thing.

I will use this to check for 64bit Windows:
process.env.hasOwnProperty('ProgramFiles(x86)')

@hoffi hoffi closed this as completed in 0a82b9d Feb 4, 2015
@hoffi
Copy link
Owner

hoffi commented Feb 4, 2015

Thanks for this @LodewijkSioen :)
I have released a new version with the fix. Can you try it again and report back if it worked for you?

hoffi added a commit that referenced this issue Feb 4, 2015
@LodewijkSioen
Copy link
Author

Updated, removed the hardcoded path to MsBuild, ran it trough AppVeyor and the build went green. That was quick!

🙌

@hoffi
Copy link
Owner

hoffi commented Feb 5, 2015

Great :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants