Skip to content

Commit

Permalink
export: prevent temporary file from being deleted on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbstp committed Aug 3, 2023
1 parent 69b73f2 commit 083039c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cmd/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ pub fn export(settings: &Settings, context_name: String, namespace_name: String)
.suffix(".yaml")
.tempfile()?;
kubeconfig.write_to_file(temp_config_file.path())?;
println!("{}", temp_config_file.path().display());
let (_, path) = temp_config_file.keep()?;
println!("{}", path.display());
}

std::process::exit(0);
Expand Down

0 comments on commit 083039c

Please sign in to comment.