From 62b80d74bf19c89db2d401256b0f2464e7581c44 Mon Sep 17 00:00:00 2001 From: Felix Tenley Date: Mon, 21 Jan 2019 14:08:12 +0100 Subject: [PATCH] skip postinstall chown on Windows systems When running the current library version on Windows the process fails with an `chown: invalid option -- '1'` error messages. This is because `os.userInfo()` returns -1 for uid & gid on Windows systems (https://nodejs.org/api/os.html#os_os_userinfo_options). Skipping the postinstall step on Windows seems to be a good option for now. On my system it's running fine. --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 6770f21..0a8ceb8 100644 --- a/index.js +++ b/index.js @@ -335,6 +335,8 @@ pip3 install -U virtualenv && ${runPy} postinstall(dir, libDir, funcRuntime) { if (!this.dockerizedPip) { return BbPromise.resolve() + } else if (os.platform() === 'win32') { + return BbPromise.resolve() } const cmd = (() => { const userInfo = os.userInfo();