From 9e6d056dab32abd1f8381a701e1cd00d4fb8c660 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 20 May 2019 20:50:59 +0200 Subject: sqv, tool: Make build script more robust. - Create $CARGO_TARGET_DIR first. Fixes a build problem if $CARGO_TARGET_DIR does not exist when the build script is run. --- sqv/build.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sqv') diff --git a/sqv/build.rs b/sqv/build.rs index c0f21c05..ea6513b1 100644 --- a/sqv/build.rs +++ b/sqv/build.rs @@ -1,6 +1,7 @@ extern crate clap; use std::env; +use std::fs; use clap::Shell; mod sqv_cli { @@ -12,6 +13,7 @@ fn main() { None => return, Some(outdir) => outdir, }; + fs::create_dir_all(&outdir).unwrap(); let mut sqv = sqv_cli::build(); for shell in &[Shell::Bash, Shell::Fish, Shell::Zsh, Shell::PowerShell, Shell::Elvish] { -- cgit v1.2.3