From 1065a7809161fd4dc23e96b642019fc842fdacf2 Mon Sep 17 00:00:00 2001 From: Xu Meng Date: Tue, 11 Dec 2018 06:43:24 +0800 Subject: [PATCH] config: support default user on IBM i (#65) setuid() can not accept a 'nobody' parameter on IBM i. The default user (QSECOFR) on IBM i has user id 0. PR-URL: https://github.com/npm/cli/pull/65 Credit: @dmabupt Reviewed-By: @zkat --- lib/config/defaults.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 991a2129f6894..2592659539120 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -239,7 +239,7 @@ Object.defineProperty(exports, 'defaults', {get: function () { process.getuid() !== 0, 'update-notifier': true, usage: false, - user: process.platform === 'win32' ? 0 : 'nobody', + user: (process.platform === 'win32' || os.type() === 'OS400') ? 0 : 'nobody', userconfig: path.resolve(home, '.npmrc'), umask: process.umask ? process.umask() : umask.fromString('022'), version: false,