Repository navigation
fix(template): warn about an absolute rendered path instead of dropping it - #187
Merged
Merged
Conversation
…ng it (GH-184) Execute renders a path with the template's own separators swapped for a marker, so only a name the template renders empty counts as a conditional skip. A value with a leading / now reaches the IsLocal check: skipped with a warning for a local template, an error for a cloned one.
…al directory example (GH-184)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #184
Summary
Executerenders a path with the template's own separators swapped for a marker, so only a name the template renders empty counts as a conditional skip/now reaches thefilepath.IsLocalcheck from Rendered file names are not bounds-checked: a template can write outside the output directory #183: skipped with a warning for a local template, an error for a cloned one, reported bytemplate validateDecisions and skipped steps
Dir: a//b) used to drop the files silently; the path is now cleaned and written asa/b/x.txt{{ if .UseSonarQube }}docs/images{{ end }}/example never worked: a directory named{{ if .X }}docsdoes not parse on its own and is skipped, even when the condition is true. Replaced with{{ if .UseSonarQube }}docs{{ end }}/images/badge.png<no value>. Filed as A file name that fails to render is dropped silently, and an undefined variable renders as <no value> #186