mirror of https://github.com/k3s-io/k3s
Merge pull request #46829 from cblecker/swagger-dir-fix
Automatic merge from submit-queue (batch tested with PRs 47921, 45984, 46829, 46896, 46923) Create output_dir if doesn't exist **What this PR does / why we need it**: Minor fix to the swagger spec gen, that if the directory doesn't exist, create it before copying. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
a509cbf919
|
@ -154,6 +154,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}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue