From 05c7d11baba6eca78cd9b440a6453fdab366c2c8 Mon Sep 17 00:00:00 2001 From: Damien Martin-Guillerez Date: Mon, 29 Feb 2016 10:15:52 +0000 Subject: Use client environment for repository_ctx.which path environment This unify the way which() and os.environ() get their environment and won't lead to weird issue. -- MOS_MIGRATED_REVID=115829154 --- src/test/shell/bazel/skylark_repository_test.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/test/shell') diff --git a/src/test/shell/bazel/skylark_repository_test.sh b/src/test/shell/bazel/skylark_repository_test.sh index 7d49598e2f..7c6cb7b4ee 100755 --- a/src/test/shell/bazel/skylark_repository_test.sh +++ b/src/test/shell/bazel/skylark_repository_test.sh @@ -268,12 +268,22 @@ EOF function test_skylark_repository_which_and_execute() { setup_skylark_repository + bazel info + + # Test we are using the client environment, not the server one + echo "#!/bin/bash" > bin.sh + echo "exit 0" >> bin.sh + chmod +x bin.sh + # Our custom repository rule cat >test.bzl <& $TEST_log || fail "Failed to build" + PATH="${PATH}:${PWD}" bazel build @foo//:bar >& $TEST_log || fail "Failed to build" expect_log "version" } -- cgit v1.2.3