feat: Only generate manifest if update is specified (#8)
* Only generate manifest if update is specified BREAKING CHANGE: packwatch will now exit with a non-zero code if run without an existing manifest file and without the --update-manifest flag. Now run packwatch --update-manifest to generate a manifest for the first time. * Fail but still generate manifest
This commit is contained in:
parent
a34e42a5e1
commit
16e0ea7ff0
1 changed files with 3 additions and 1 deletions
|
@ -33,7 +33,9 @@ if (!existsSync(MANIFEST_FILENAME)) {
|
|||
console.log(
|
||||
`Package size (${currentStats.packageSize}) adopted as new limit.`,
|
||||
)
|
||||
process.exit(0)
|
||||
// If the update flag wasn't specified, exit with a non-zero code so we
|
||||
// don't "accidentally" pass CI builds if the manifest didn't exist
|
||||
process.exit(isUpdatingManifest ? 0 : 1)
|
||||
}
|
||||
|
||||
const previousStats = getPreviousPackageStats()
|
||||
|
|
Reference in a new issue