mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
Ensure that dev-env is in PATH for other dev-env tools (#2127)
This is relevant for users of the IntelliJ bazel plugin. It is common to start IntelliJ via the GUI such that the dev-env is not loaded for IntelliJ. The bazel plugin is then configured to execute the dev-env bazel by entering the path into the corresponding configuration option. However, this bazel is then executed without the dev-env tools in PATH. Some of the repository rules expect certain dev-env tools in PATH, e.g. python3. Those will then fail. This patch ensures that the dev-env is loaded when executing dev-env tools from outside the dev-env.
This commit is contained in:
parent
f57e437b80
commit
f64b63f7a3
@ -127,6 +127,8 @@ execTool() {
|
||||
local outputName=$2
|
||||
local binary=$3
|
||||
shift 3
|
||||
[[ $PATH =~ (^|.*:)$DADE_DEVENV_DIR/bin($|:.*) ]] || \
|
||||
eval "$(${DADE_DEVENV_DIR}/bin/dade assist)"
|
||||
buildTool $attr $outputName 0
|
||||
exec "$(readlink "$DADE_BUILD_RESULT")/bin/$binary" "$@"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user