1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
--- a/build.rs
+++ b/build.rs
@@ -14,6 +14,8 @@
include!("src/cli/args.rs");
+const OUT_DIR: &str = "debian/build_artifacts";
+
/// The man page built by clap-mangen is too rough to be used as is. It's only
/// used as part of a manual process to update the one in /man/page
/// so this generation is usually not needed
@@ -34,7 +36,8 @@
/// write the shell completion scripts which will be added to
/// the release archive
fn build_completion_scripts() {
- let out_dir = env::var_os("OUT_DIR").expect("out dir not set");
+ let out_dir = OUT_DIR;
+ if std::fs::create_dir_all(out_dir).is_err() { return; }
write_completions_file(Shell::Bash, &out_dir);
write_completions_file(Shell::Elvish, &out_dir);
write_completions_file(Shell::Fish, &out_dir);
|