Skip to content

Commit 9555822

Browse files
committed
Fix CI detection: check for non-null instead of 'true'
- Change CI detection from == 'true' to != null - GitHub Actions sets CI and GITHUB_ACTIONS to 'true' (string), but checking != null is more robust - Ensures runSetupBuilderTestTasks is properly skipped in CI environments
1 parent 904fd3a commit 9555822

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,11 @@ task runSetupBuilderTestTasks(type: GradleBuild) {
282282
def isRequested = requestedTasks.contains('test') || requestedTasks.contains('check')
283283

284284
// Detect CI environment (GitHub Actions, Jenkins, Travis, etc.)
285-
def isCI = System.getenv('CI') == 'true' ||
286-
System.getenv('GITHUB_ACTIONS') == 'true' ||
285+
// GitHub Actions sets CI=true and GITHUB_ACTIONS=true
286+
def isCI = System.getenv('CI') != null ||
287+
System.getenv('GITHUB_ACTIONS') != null ||
287288
System.getenv('JENKINS_URL') != null ||
288-
System.getenv('TRAVIS') == 'true'
289+
System.getenv('TRAVIS') != null
289290

290291
return isRequested && !isCI
291292
}

0 commit comments

Comments
 (0)