Skip to content
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 overriding of OUT_DIR in build.rs #124

Merged
merged 2 commits into from
Oct 17, 2017
Merged

Allow overriding of OUT_DIR in build.rs #124

merged 2 commits into from
Oct 17, 2017

Conversation

Knugel
Copy link
Contributor

@Knugel Knugel commented Oct 16, 2017

Fixes #121.

  • Uses SHELL_COMPLETIONS_DIR to change the output directory of the completions.

build.rs Outdated
@@ -6,7 +6,8 @@ use clap::Shell;
include!("src/app.rs");

fn main() {
let outdir = match std::env::var_os("OUT_DIR") {
let var = std::env::var_os("OVRD_OUT_DIR").or_else(|| std::env::var_os("OUT_DIR"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

What about naming this something like SHELL_COMPLETIONS_DIR?

Also, I think you can use Option::or here to avoid the lambda expression.

@Knugel
Copy link
Contributor Author

Knugel commented Oct 16, 2017

Removed the lambda and renamed the env variable to SHELL_COMPLETIONS_DIR.

@sharkdp sharkdp merged commit 37def9b into sharkdp:master Oct 17, 2017
@sharkdp
Copy link
Owner

sharkdp commented Oct 17, 2017

Thank you very much.

@ilovezfs ilovezfs mentioned this pull request Oct 17, 2017
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants