@lesliechan721/aw 0.1.0-beta.17 → 0.1.0-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/index.js CHANGED
@@ -3197,11 +3197,11 @@ export function buildProgram(options = {}) {
3197
3197
  commandExitState.exitCode = result.hasErrors ? 1 : 0;
3198
3198
  writeLine(io.stdout, result.output);
3199
3199
  for (const source of result.payload.catalog.sources) {
3200
- if (source.error)
3200
+ if (rawOptions.json && source.error)
3201
3201
  writeLine(io.stderr, `${source.id}: ${source.error}`);
3202
3202
  }
3203
3203
  for (const error of result.payload.errors) {
3204
- if (error.code !== 'nativeStateUnreadable' && error.code !== 'stateInventoryFailed') {
3204
+ if (rawOptions.json && error.code !== 'nativeStateUnreadable' && error.code !== 'stateInventoryFailed') {
3205
3205
  writeLine(io.stderr, error.message);
3206
3206
  }
3207
3207
  }