bazel: move .bazelrc back to the repo root (#596)

It turns out that bazel still loads the .bazelrc file even if an
explicit --bazelrc argument is passed to it.
This commit is contained in:
Jonas Chevalier 2019-04-18 14:04:23 +02:00 committed by mergify[bot]
parent 3b8ae1ff86
commit 4184867916
3 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ function bazel() {
$global:lastexitcode = 0
$backupErrorActionPreference = $script:ErrorActionPreference
$script:ErrorActionPreference = "Continue"
& bazel.exe --bazelrc=.\nix\bazelrc @args 2>&1 | %{ "$_" }
& bazel.exe @args 2>&1 | %{ "$_" }
$script:ErrorActionPreference = $backupErrorActionPreference
if ($global:lastexitcode -ne 0 -And $args[0] -ne "shutdown") {
Write-Output "<< bazel $args (failed, exit code: $global:lastexitcode)"

View File

@ -193,6 +193,8 @@ in rec {
# Build tools
# wrap the .bazelrc to automate the configuration of
# `build --config <kernel>`
bazelrc =
let
kernel =
@ -202,7 +204,6 @@ in rec {
in
pkgs.writeText "daml-bazelrc" ''
build --config ${kernel}
${builtins.readFile ./bazelrc}
'';
bazel = pkgs.writeScriptBin "bazel" (''