Skip to content

Commit 13909a3

Browse files
committed
* Adds BUCKAROO_USE_BUCK env var
1 parent cc8a4ce commit 13909a3

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

buckaroo/Tasks.fs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,32 @@ let private isWindows () =
2525
let private determineBuildSystem (logger : Logger) = async {
2626
let useBazel =
2727
Environment.GetEnvironmentVariable "BUCKAROO_USE_BAZEL"
28-
|> isNull
28+
|> String.IsNullOrWhiteSpace
2929
|> not
3030

3131
if useBazel
3232
then
3333
return Bazel
3434
else
35-
let! hasBuckConfig = Files.exists ".buckconfig"
35+
let useBuck =
36+
Environment.GetEnvironmentVariable "BUCKAROO_USE_BUCK"
37+
|> String.IsNullOrWhiteSpace
38+
|> not
3639

37-
if hasBuckConfig
40+
if useBuck
3841
then
39-
logger.Warning "Using the Buck build-system since a .buckconfig file was found. Set BUCKAROO_USE_BAZEL to override this. "
4042
return Buck
4143
else
42-
return Bazel
44+
let! hasBuckConfig = Files.exists ".buckconfig"
45+
46+
if hasBuckConfig
47+
then
48+
logger.Warning "Using the Buck build-system since a .buckconfig file was found. Set BUCKAROO_USE_BAZEL to override this or BUCKAROO_USE_BUCK to hide this warning. "
49+
return Buck
50+
else
51+
return Bazel
4352
}
4453

45-
4654
let private getCachePath = async {
4755
return
4856
match System.Environment.GetEnvironmentVariable("BUCKAROO_CACHE_PATH") with

0 commit comments

Comments
 (0)