From f75274e04e286acdba3d26ddb9933b5e81bbfbd8 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Thu, 1 Jun 2017 22:37:16 -0700 Subject: [PATCH] Create output_dir if doesn't exist --- hack/lib/swagger.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hack/lib/swagger.sh b/hack/lib/swagger.sh index bea1a5f7187..78cd26e0579 100644 --- a/hack/lib/swagger.sh +++ b/hack/lib/swagger.sh @@ -142,6 +142,9 @@ kube::swagger::gen_api_ref_docs() { echo "Moving api reference docs from ${output_tmp} to ${output_dir}" + # Create output_dir if doesn't exist. Prevents error on copy. + mkdir -p "${output_dir}" + cp -af "${output_tmp}"/* "${output_dir}" rm -r "${output_tmp}" }