Skip to content

Processing files and folders in-place #1400

Answered by hairyhenderson
air3ijai asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @air3ijai, thanks for the questions - I've converted this to a Discussion since it does not appear to be a bug report or feature request.

  1. It is safe to preprocess files/folders in place?

In general, it should be safe - gomplate reads the contents of each template into memory before rendering it, so the output file won't be written until after the input is read. Obviously, if you're processing a file in-place, it will be modified - that may not be considered "safe".

  1. Is there a switch to not use --out/--output-dir and just process same file/folder?

No. It's pretty rare to do this as generally folks don't want templates to be modified, so I don't think it makes sense to add this a…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by air3ijai
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1399 on May 18, 2022 02:29.