-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Export base directory before loading config file #347
Export base directory before loading config file #347
Conversation
…dir within config
I suspect shellcheck wouldn't be happy with that and want the assignment and export on separate lines. |
This same structure is used for many exports below, which is why I chose to keep in line with those lines.
|
I didn't know about shellcheck when I wrote the first version, so I wouldn't be surprised. Just trying to stick to better practices now. In most case, an export and assignment on the same line is fine because there's no command substitution. In this case, because the assignment can fail, you'd want to catch that (which doesn't happen if you export on the same line). I'm not sure the I think if you move the existing BASE_DIR= and export BASE_DIR lines up so that's they're after the root user check, it should be fine. |
Alright, always a fan of better practices:) I can't think of any use for defining BASE_DIR outside of build.sh, but figured that as I'm changing it anyway, might as well align it with the rest of the code. Updated as per your suggestion. |
Just one last thing. There's a stray Line 183 in 97076ab
|
Nice catch, my bad! |
Many thanks |
Many thanks to you as well! |
By exporting the base directory before loading config, it is possible to use the base dir within the config file.