Skip to content

Commit

Permalink
fix(nano-build): error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD committed Dec 23, 2023
1 parent adf7b8f commit e95b497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/nano-build/nano-build.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {existsSync} = require('fs');

const packageJsonPath = resolve(process.cwd(), 'package.json');
if (existsSync(packageJsonPath) === false) {
console.error('package.json not found', {path: packageJsonPath});
console.error('package.json not found', {path: packageJsonPath});
process.exit(1);
}
const packageJson = require(packageJsonPath);
Expand Down Expand Up @@ -75,8 +75,8 @@ function getOptions() {
let presetName = process.argv.find((arg) => arg.startsWith('--preset='))?.split('=')[1] ?? 'default';
console.log('preset: %s', presetName);
const presetOptions = presetRecord[presetName];
if (presetOptions) {
console.error('preset not found', {preset: presetName});
if (!presetOptions) {
console.error('preset not found', {preset: presetName});
process.exit(1);
}

Expand Down

0 comments on commit e95b497

Please sign in to comment.