Sha256: 2b9b879c71623801b1a3ff9e04a79fa5c9de68350cb1a6aa83191bba8d187f02

Contents?: true

Size: 644 Bytes

Versions: 45

Compression:

Stored size: 644 Bytes

Contents

if (module !== require.main) {
  throw new Error("This file should not be loaded with require()")
}

if (!process.getuid || !process.getgid) {
  throw new Error("this file should not be called without uid/gid support")
}

var argv = process.argv.slice(2)
  , user = argv[0] || process.getuid()
  , group = argv[1] || process.getgid()

if (!isNaN(user)) user = +user
if (!isNaN(group)) group = +group

console.error([user, group])

try {
  process.setgid(group)
  process.setuid(user)
  console.log(JSON.stringify({uid:+process.getuid(), gid:+process.getgid()}))
} catch (ex) {
  console.log(JSON.stringify({error:ex.message,errno:ex.errno}))
}

Version data entries

45 entries across 36 versions & 9 rubygems

Version Path
affiliator-0.2.1 node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
lanes-0.8.0 node_modules/uid-number/get-uid-gid.js
lanes-0.8.0 node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
node-compiler-0.9.1 vendor/node/deps/npm/node_modules/uid-number/get-uid-gid.js
node-compiler-0.9.0 vendor/node-v7.2.1/deps/npm/node_modules/uid-number/get-uid-gid.js
node-compiler-0.8.0 vendor/node-v7.2.0/deps/npm/node_modules/uid-number/get-uid-gid.js
node-compiler-0.7.0 vendor/node-v7.1.0/deps/npm/node_modules/uid-number/get-uid-gid.js
node-compiler-0.7.0 vendor/node-v6.9.1/deps/npm/node_modules/uid-number/get-uid-gid.js
brwy_rails-0.0.6 test/dummy/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
brwy_rails-0.0.5 test/dummy/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
brwy_rails-0.0.4 test/dummy/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
brwy_rails-0.0.3 test/dummy/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
brwy_rails-0.0.2 test/dummy/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
brwy_rails-0.0.1 test/dummy/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/get-uid-gid.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/get-uid-gid.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/fsevents/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/get-uid-gid.js
hooch-0.4.2 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/uid-number/get-uid-gid.js
hooch-0.4.1 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/uid-number/get-uid-gid.js
hooch-0.4.0 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/uid-number/get-uid-gid.js