Skip to content

Commit

Permalink
Test flock on directory rather than stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymVlasov committed Feb 8, 2024
1 parent 30b3069 commit b6017f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function common::terraform_init {
# https://github.com/hashicorp/terraform/issues/31964
if [ -n "$TF_PLUGIN_CACHE_DIR" ]; then
echo "$(date "+%s %N") DBG $dir_path: 1. flock --exclusive"
flock --exclusive 0 #! NOT EXIST IN MAC - https://stackoverflow.com/questions/10526651/mac-os-x-equivalent-of-linux-flock1-command
flock --exclusive "$TF_PLUGIN_CACHE_DIR" terraform init #! NOT EXIST IN MAC - https://stackoverflow.com/questions/10526651/mac-os-x-equivalent-of-linux-flock1-command
fi

echo "$(date "+%s %N") DBG $dir_path: 2. before tf init"
Expand All @@ -366,7 +366,7 @@ function common::terraform_init {
fi

if [ -n "$TF_PLUGIN_CACHE_DIR" ]; then
flock --unlock 0 #! NOT EXIST IN MAC - https://stackoverflow.com/questions/10526651/mac-os-x-equivalent-of-linux-flock1-command
flock --unlock "$TF_PLUGIN_CACHE_DIR" terraform init #! NOT EXIST IN MAC - https://stackoverflow.com/questions/10526651/mac-os-x-equivalent-of-linux-flock1-command
echo "$(date "+%s %N") DBG $dir_path: 3. after tf init. flock --unlock"
fi

Expand Down

0 comments on commit b6017f1

Please sign in to comment.