From d31b8e25fad4568dd26978e58f103616444de930 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Thu, 6 Oct 2022 10:33:59 +0300
Subject: [PATCH] tfvf: Init the module.

---
 .bashrc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.bashrc b/.bashrc
index 2b70dae..4a4ab58 100644
--- a/.bashrc
+++ b/.bashrc
@@ -168,7 +168,7 @@ alias sudome="sudome "
 alias tfa='tf apply tfplan'
 alias tfaa='tf apply -auto-approve'
 alias tfp='tf plan -out tfplan'
-alias tfvf='tf validate && tf fmt -diff'
+alias tfvf='tf init -backend=false && tf validate && tf fmt -diff'
 alias todo="vim \$HOME/Documents/TODO.yml"
 # shellcheck disable=SC2142
 alias tolower='awk "{print tolower(\$0)}"'
@@ -425,9 +425,11 @@ if [ "$HOSTNAME" = 'toolbox' ]
 then
     alias flatpak-spawn='/usr/libexec/flatpak-xdg-utils/flatpak-spawn --host'
     gio () { /usr/libexec/flatpak-xdg-utils/flatpak-spawn --host gio "$@"; }
-    [ ! -S "$XDG_RUNTIME_DIR/podman/podman.sock" ] ||
-        [ ! -w "$XDG_RUNTIME_DIR/podman/podman.sock" ] ||
+    if [  -S "$XDG_RUNTIME_DIR/podman/podman.sock" ] && [ -w "$XDG_RUNTIME_DIR/podman/podman.sock" ]
+    then
         alias podman='podman --remote'
+        export DOCKER_HOST=unix://"$XDG_RUNTIME_DIR/podman/podman.sock"
+    fi
 fi
 
 # shellcheck disable=SC2119
-- 
GitLab