File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -332,12 +332,22 @@ def main():
332332 else : common .empty_and_delete_bucket ()
333333
334334
335+ # does a terraform.tfstate file exist in globals.path1 directory ?
336+ if not os .path .isfile (globals .path1 + "/terraform.tfstate" ) and globals .merge :
337+ print ("No terraform.tfstate file found in " + globals .path1 + " - cannot merge" )
338+ globals .merge = False
339+ com = "rm -rf " + globals .path1
340+ rout = common .rc (com )
341+ if globals .serverless : common .empty_and_delete_bucket ()
342+
343+
335344 if globals .merge is False :
336345 com = "rm -rf " + globals .path1
337346 rout = common .rc (com )
338347 if globals .serverless : common .empty_and_delete_bucket ()
339348
340349
350+
341351 com = "mkdir -p " + globals .path2
342352 rout = common .rc (com )
343353
You can’t perform that action at this time.
0 commit comments