This repository has been archived by the owner. It is now read-only.

`process.platform` changed from `sunos` in v0.6 to `solaris` in v0.8 #3944

Closed
trentm opened this Issue Aug 29, 2012 · 8 comments

Comments

Projects
None yet
4 participants

trentm commented Aug 29, 2012

SCons -> gyp change:

[root@trent0b:~/src/node6/tools/scons/scons-local-1.2.0]$ python -c 'import SCons.Platform; print SCons.Platform.Platform().name'
sunos

[root@trent0b:~/src/node8/tools/gyp/pylib]$ python -c "from gyp import common; print common.GetFlavor({})"
solaris

It should go back to sunos.

Well we already normalize "win" into "win32" and "mac" into "darwin" for backward-compat purposes. This would have been nice to catch in the v0.7.x days though.

In any case, does someone wanna review? TooTallNate/node@27e76d7

TooTallNate added a commit to TooTallNate/node that referenced this issue Aug 29, 2012

build: set `process.platform` to "sunos" on SunOS
gyp sets it to "solaris" by default, but versions of node v0.6.x and
older would report "sunos". Let's keep things consistent.

Fixes #3944.

Thanks for the report @trentm, fixed in the master branch in 606a933.

trentm commented Aug 29, 2012

Thanks!

trentm commented Aug 29, 2012

Er forgot to ask: back port to v0.8 ?

@bnoordhuis has reservations. What do you need it for specifically? Just do /sunos|solaris/.test(process.platform) or something for now (you would need to anyways for the 8 releases from v0.8 that already exist).

Member

bnoordhuis commented Aug 29, 2012

"Reservations" is a strong word, I'm just reactionary by nature. If there's a good reason to merge it into v0.8, we will.

isaacs commented Aug 29, 2012

There will probably be more 0.8 releases, and the last few are always the most relevant. sunos is the proper term for the family of operating systems. Currently, it's a bit like reporting linux as redhat or something.

I think this is a bug. Let's backport to 0.8.

TooTallNate added a commit that referenced this issue Aug 29, 2012

build: set `process.platform` to "sunos" on SunOS
gyp sets it to "solaris" by default, but versions of node v0.6.x and
older would report "sunos". Let's keep things consistent.

Fixes #3944.

I think this is a bug. Let's backport to 0.8.

Fair enough. Backported to v0.8 in 355c148.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.