Skip to content

Commit 53be146

Browse files
committed
simplify ADDITIONAL_TF_OVERRIDE_LOCATION parsing
1 parent 9ed29f6 commit 53be146

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

bin/tflocal

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,8 @@ LOCALHOST_HOSTNAME = "localhost.localstack.cloud"
3939
S3_HOSTNAME = os.environ.get("S3_HOSTNAME") or f"s3.{LOCALHOST_HOSTNAME}"
4040
USE_EXEC = str(os.environ.get("USE_EXEC")).strip().lower() in ["1", "true"]
4141
TF_CMD = os.environ.get("TF_CMD") or "terraform"
42-
ADDITIONAL_TF_OVERRIDE_LOCATIONS = (
43-
x
44-
for x in os.environ.get("ADDITIONAL_TF_OVERRIDE_LOCATIONS", default="").split(
45-
sep=","
46-
)
47-
if x and x != ""
42+
ADDITIONAL_TF_OVERRIDE_LOCATIONS = os.environ.get(
43+
"ADDITIONAL_TF_OVERRIDE_LOCATIONS", default=""
4844
)
4945
TF_UNPROXIED_CMDS = (
5046
os.environ.get("TF_UNPROXIED_CMDS").split(sep=",")
@@ -579,8 +575,9 @@ def get_folder_paths_that_require_an_override_file() -> Iterable[str]:
579575
return
580576

581577
yield get_default_provider_folder_path()
582-
for path in ADDITIONAL_TF_OVERRIDE_LOCATIONS:
583-
yield path
578+
for path in ADDITIONAL_TF_OVERRIDE_LOCATIONS.split(sep=","):
579+
if path.strip():
580+
yield path
584581

585582

586583
# ---

0 commit comments

Comments
 (0)