-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using template in custom directory #770
Conversation
What is actually the usecase here? |
Running a temple in current directory. Right now one can only run templates when the are in two locations. The templates directory, or one directory lower than PWD. Say I have a template I'm working on inside a folder called "guacamole" that I want to run. I would first have to back up one directory and then have to run the template command with "directory/guacamole" This PR simply allows me to run "guacamole" as the template arg. |
I see, but running nested local templates would still not be possible since you need to use a slash.. |
It is possible currently. And would still be possible with this PR. If you look at the case command, there are only two options, the template directory and the current directory/other. This PR simply adds an additional case block allowing for any other input. It will check if that input is a directory, then if it is, check if there is a Bastillefile inside. If not, exit. |
tested the following:
|
Revert "Merge pull request #770 from tschettervictor/patch-7"
This was reverted in #779 since it broke the @tschettervictor feel free to open a new PR. |
No issue. After careful consideration, it's probably best to leave it as is. Templates should follow the structure of project/template anyway in my opinion. While it would be nice to still do it as I wanted, it's not an important addition. Thanks for pointing that out. |
Oops I just noticed I was actually missing a ;; at the end. I'll open a new PR for you to test... |
This PR will allow users to specify any template directory to use with Bastille.
If the template is not found in the template directory, it will check the current directory and try to determine if a Bastillefile is present. If not, it will exit as normal.