Skip to content

fix: set non-zero exit code when errors are found in analyzer#394

Open
assassinaj602 wants to merge 1 commit into
google:masterfrom
assassinaj602:fix-exit-code-on-failure
Open

fix: set non-zero exit code when errors are found in analyzer#394
assassinaj602 wants to merge 1 commit into
google:masterfrom
assassinaj602:fix-exit-code-on-failure

Conversation

@assassinaj602

Copy link
Copy Markdown

Description

Fixes issue where dartdoc_test returns exit code 0 even when tests fail.

The Problem

When running dart run dartdoc_test, the command would always exit with code 0, even when errors were found. This made it impossible to use in CI/CD pipelines.

What I Changed

  • Added import 'dart:io'; to lib/src/analyzer.dart
  • Set exitCode = 1 when hasIssues is true

Testing

  • ✅ All 18 tests pass
  • ✅ Errors now properly set non-zero exit code
  • ✅ Success still returns exit code 0

Closes #274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dartdoc_test returns 0 even on failure

1 participant