Closed OldMetalmind closed 1 year ago
Hi @OldMetalmind π I believe this is a duplicate of https://github.com/felangel/mason/issues/751. Let me know if that helps π
The following comment helped https://github.com/felangel/mason/issues/751#issuecomment-1439412564
I wasn't aware slash and backslash could both be used in the closing tag of the conditional in the file name. Just tried out and it works.
Maybe we should have a note in the documentation https://docs.brickhub.dev/brick-syntax#-conditionals stating that? I don't mind preparing a PR for that if you so wish.
Feel free to close this issue :v:
Glad that helped!
I wasn't aware slash and backslash could both be used in the closing tag of the conditional in the file name. Just tried out and it works. Maybe we should have a note in the documentation https://docs.brickhub.dev/brick-syntax#-conditionals stating that?
I donβt think it works universally on all platforms/os so Iβm hesitant to update the docs to recommend it.
Closing for now but feel free to comment with any follow ups and I'm happy to continue the conversation π
Description
Creating a file name for a conditional brick variable, with a slash ( aka: forward slash, Solidus, /) is not possible in linux based OSs since it is a reserved character.
Steps To Reproduce
touch {{#createChangelog}}CHANGELOG.md{{/createChangelog}}
;No such file or directory
;Expected Behavior
I should be able to create a conditional brick template file.
Screenshots N/A
Additional Context Maybe we can use a different special caracter for the closing mustache conditional? Given / is reserved.
This is useful when we want to create a conditional for the file name ( https://docs.brickhub.dev/brick-syntax#-conditionals ) however even if we escape the special character forward slash with a backslash, it gives out the error
No such file or directory
. I also tried to create the file directly through the IDE but without successNone of the following work: