diff --git a/source-swap.sh b/source-swap.sh index a9c0a0c..f39dfaa 100644 --- a/source-swap.sh +++ b/source-swap.sh @@ -27,13 +27,6 @@ path_to_main="" source_swap_found=false -# Check if current working directory contains "prd" -current_dir=$(pwd) -if [[ "$current_dir" == *"/prd"* ]]; then - printf "Warning: Current working directory contains 'prd'. Source swapping should only be done in non-prod environments to avoid unintended changes in production.\n" - printf "Remove the source-swap block from terragrunt.hcl and try again.\n" -fi - while IFS= read -r line || [ -n "$line" ]; do old_source="" new_source="" @@ -127,4 +120,4 @@ if [[ "$source_swap_found" = false ]]; then printf "Source-swap was not found in terragrunt.hcl\n" printf "You can add source-swap code block as follows: (Commented out on purpose to avoid Terragrunt errors - this is not a funtion of Terragrunt)\n" printf '# source-swap "module_name(Use * to swap all)" {\n# old-source = "old-source-path"\n# new-source = "new-source-path"\n# }\n' -fi \ No newline at end of file +fi