--- a/build.rs
+++ b/build.rs
@@ -11,6 +11,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
@@ -30,7 +32,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);
