diff --git a/tools/install.sh b/tools/install.sh index 04b4f792..38b74229 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -29,18 +29,18 @@ function main() { local path_missing="" local path="$(hscloud::workspace_location)/bazel-bin/tools" - if [[ ":$PATH:" == *":$path:"* ]]; then + if [[ ":$PATH:" != *":$path:"* ]]; then path_missing="$path" fi local path="$(hscloud::workspace_location)/bazel-bin/cluster/tools" - if [[ ":$PATH:" == *":$path:"* ]]; then + if [[ ":$PATH:" != *":$path:"* ]]; then if [ -z "$path_missing" ]; then path_missing="$path" else path_missing="$path_missing:$path" fi fi - if [ -z "$path_missing" ]; then + if [ ! -z "$path_missing" ]; then echo "Tools built correctly, but your PATH should be updated to access them:">&2 echo ' PATH="$PATH:'$path_missing'"' echo 'Add the above line to your shell profile, or source env.sh from the root of hscloud.'