jinjaform icon indicating copy to clipboard operation
jinjaform copied to clipboard

Delete broken symlinks in shared modules directory

Open raymondbutcher opened this issue 6 years ago • 1 comments

I renamed a directory and it broke a bunch of symlinks in my .jinjaform/modules directory. I had to run terraform get -update to fix them. It would be handy if Jinjaform would notice the broken symlinks in that directory and delete them.

raymondbutcher avatar Apr 04 '19 15:04 raymondbutcher

This is tricky.

If .jinaformrc has RUN ln -fs "${JINJAFORM_PROJECT_ROOT}/modules" "${JINJAFORM_WORKSPACE}/modules" then modules will be going through a symlink that only exists after the workspace has been created. So we can add this feature in the workspace creation function.

Perhaps this should be done with another command in .jinjaformrc, after the symlink is created but before the TERRAFORM_RUN command.

raymondbutcher avatar Apr 17 '19 15:04 raymondbutcher