Ignore home package.json no license field

This commit is contained in:
Keraito 2018-05-04 22:46:08 +02:00
parent 3539625d7f
commit 8a08d40f77
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { spawn } from 'cross-spawn';
import hasYarn from './has_yarn';
import whitelistedWarnings from './whitelisted_warnings';
const packageManager = hasYarn() ? 'yarn' : 'npm';
@ -34,7 +35,11 @@ export default function latestVersion(packageName) {
command.stderr.on('data', data => {
// yarn error
const info = JSON.parse(data);
reject(new Error(info.data));
whitelistedWarnings.forEach(whitelistedWarning => {
if (!info.data.includes(whitelistedWarning)) {
reject(new Error(info.data));
}
});
});
});
}

View File

@ -0,0 +1 @@
export default ['package.json: No license field'];