-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): do not depend on ci info crate (#28850)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> The way VS Code / Nx Console starts the daemon makes the ci info rust crate believe that the daemon process is running in CI. This starts the database using the unix dotfile... which causes issues ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> The ci info rust crate is not used, we have our own logic which is identical to the JS logic we have. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
- Loading branch information
1 parent
158d343
commit 7f39dc1
Showing
6 changed files
with
42 additions
and
44 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use std::env; | ||
|
||
pub fn is_ci() -> bool { | ||
env::var("CI").is_ok_and(|s| s != "false") | ||
|| env::var("TF_BUILD").is_ok_and(|s| s == "true") | ||
|| env::var("GITHUB_ACTIONS").is_ok_and(|s| s == "true") | ||
|| env::var("BUILDKITE").is_ok_and(|s| s == "true") | ||
|| env::var("CIRCLECI").is_ok_and(|s| s == "true") | ||
|| env::var("CIRRUS_CI").is_ok_and(|s| s == "true") | ||
|| env::var("TRAVIS").is_ok_and(|s| s == "true") | ||
|| env::var("bamboo.buildKey").is_ok() | ||
|| env::var("bamboo_buildKey").is_ok() | ||
|| env::var("CODEBUILD_BUILD_ID").is_ok() | ||
|| env::var("GITLAB_CI").is_ok() | ||
|| env::var("HEROKU_TEST_RUN_ID").is_ok() | ||
|| env::var("BUILD_ID").is_ok() | ||
|| env::var("BUILD_BUILDID").is_ok() | ||
|| env::var("TEAMCITY_VERSION").is_ok() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters