From 7d02248a5d016a2e536dac5b5a0d94dac43eb73e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Apr 2018 12:10:45 +0100 Subject: [PATCH] slash --- src/freedombone-utils-nodejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 1824cd42..6272c84f 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -63,10 +63,10 @@ function get_npm_arch { function nodejs_fix_cpu_detection { # fix for failing cpu detection during image build with qemu, see https://github.com/npm/npm/issues/19265 if [ -f "$rootdir/usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js" ]; then - sed -i "s|require('os').cpus().length|(require('os').cpus() || { length: 1 }).length|g" "$rootdir/usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js" + sed -i "s/require('os').cpus().length/(require('os').cpus() || { length: 1 }).length/g" "$rootdir/usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js" fi if [ -f "$rootdir/.npm-global/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js" ]; then - sed -i "s|require('os').cpus().length|(require('os').cpus() || { length: 1 }).length|g" "$rootdir/.npm-global/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js" + sed -i "s/require('os').cpus().length/(require('os').cpus() || { length: 1 }).length/g" "$rootdir/.npm-global/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js" fi # installing worker farm fixes the cpu detection bug $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g worker-farm@1.6.0 --save