fix manager crash when GPD outdated on some npm versions
This commit is contained in:
parent
eecd11a431
commit
a81c98112b
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ const { spawn } = require('child_process')
|
||||||
const PACKAGENAME = 'get-product-name'
|
const PACKAGENAME = 'get-product-name'
|
||||||
|
|
||||||
async function isOutdated () {
|
async function isOutdated () {
|
||||||
const command = `npm outdated ${PACKAGENAME} --json`
|
const command = `npm outdated ${PACKAGENAME} --json || true`
|
||||||
const npm = await exec(command)
|
const npm = await exec(command)
|
||||||
const data = JSON.parse(npm.stdout)
|
const data = JSON.parse(npm.stdout)
|
||||||
return data[PACKAGENAME]?.current !== data[PACKAGENAME]?.wanted
|
return data[PACKAGENAME]?.current !== data[PACKAGENAME]?.wanted
|
||||||
|
|
Loading…
Reference in a new issue