Skip to content

Commit 170c5f7

Browse files
committed
fix TerraForm symlink error
1 parent 2e41ecc commit 170c5f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ def generate_terraform(appName):
366366
app.synth()
367367
print('Done \033[1mAvailable in cdktf.out directory\033[0m ✅')
368368
print(' - Deleting .terraform symlink... ', end='')
369-
os.remove(os.path.join(os.getcwd(), 'cdktf.out', '.terraform'))
369+
symlinkPath = os.path.join(os.getcwd(), 'cdktf.out', '.terraform')
370+
if os.path.exists(symlinkPath):
371+
os.remove(symlinkPath)
370372
print('Done ✅')
371373
print(
372374
f' - You may edit \033[1mcdk.tf.json\033[0m and run \033[1mterraform init, \

0 commit comments

Comments
 (0)