terraform: disable terraform prompt in $HOME (#7227)

In the home directory there is a .terraform folder for modules but it is most likely not
an actual directory of terraform scripts. Therefore, this patch disables checking for workspace in the home directory.
This commit is contained in:
Tristan Escalada authored and Marc Cornellà committed 2018-10-05 20:56:56 +02:00
1 parent e09eb23158
commit 9e14387408
1 file changed
+2
+2
View File
@@ -1,4 +1,6 @@
function tf_prompt_info() {
# dont show 'default' workspace in home dir
[[ "$PWD" == ~ ]] && return
# check if in terraform dir
if [ -d .terraform ]; then
workspace=$(terraform workspace show 2> /dev/null) || return