From a81c98112bbaefbfdcbe94565e7bef72b000b8df Mon Sep 17 00:00:00 2001 From: Wingy Date: Wed, 16 Feb 2022 14:14:58 -0500 Subject: [PATCH] fix manager crash when GPD outdated on some npm versions --- manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager.js b/manager.js index 1fe514f..a55b004 100644 --- a/manager.js +++ b/manager.js @@ -4,7 +4,7 @@ const { spawn } = require('child_process') const PACKAGENAME = 'get-product-name' async function isOutdated () { - const command = `npm outdated ${PACKAGENAME} --json` + const command = `npm outdated ${PACKAGENAME} --json || true` const npm = await exec(command) const data = JSON.parse(npm.stdout) return data[PACKAGENAME]?.current !== data[PACKAGENAME]?.wanted