diff --git a/manager.js b/manager.js index e10039d..004c4a4 100644 --- a/manager.js +++ b/manager.js @@ -11,7 +11,8 @@ async function isOutdated() { } async function updateGPD() { - const command = `npm update ${PACKAGENAME}` + // https://blog.cloud66.com/using-node-with-docker/ + const command = `mv ./node_modules ./node_modules.tmp && mv ./node_modules.tmp ./node_modules && npm update ${PACKAGENAME}` await exec(command) } @@ -27,7 +28,9 @@ async function updateGPD() { if (process.env.UPDATE_GPD !== 'false') { async function update() { if (await isOutdated()) { - await updateGPD() + try { + await updateGPD() + } catch {} if (cc) cc.kill('sigint') cc.once('exit', () => console.log(`Updated ${PACKAGENAME}`)) } diff --git a/yarn.lock b/yarn.lock index 2660400..8e3f656 100644 --- a/yarn.lock +++ b/yarn.lock @@ -868,9 +868,9 @@ "tiny-each-async" "2.0.3" "get-product-name@1": - "integrity" "sha512-wGH86drg3fzsb5mjKpYpvUCqkX5M8L8edheao/wnaSW6aT7FO9m+2ZMwOTQgTFOGysSDotFRqu0WVQkatAfY4g==" - "resolved" "https://registry.npmjs.org/get-product-name/-/get-product-name-1.7.2.tgz" - "version" "1.7.2" + "integrity" "sha512-EmxDzytXhHuWSZbOIKc7aDKaCpprvFw9DaTXLtaaiG+KXT7SCwZUQYdGY/0BWmQmu6xrmJWggih/13+syCjKzw==" + "resolved" "https://registry.npmjs.org/get-product-name/-/get-product-name-1.8.0.tgz" + "version" "1.8.0" dependencies: "cheerio" "^1.0.0-rc.3" "child-process-promise" "^2.2.1"