From e6db06874ea7946703da632fdd7c4e57caa5344c Mon Sep 17 00:00:00 2001 From: joao-paulo-parity Date: Thu, 9 Feb 2023 07:05:46 -0300 Subject: [PATCH] avoid cleaning up the tmp folder on CI --- publish-crates | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/publish-crates b/publish-crates index 8329642..0205595 100755 --- a/publish-crates +++ b/publish-crates @@ -32,7 +32,12 @@ system_cargo_config_dir=/.cargo on_exit() { local exit_code=$? - rm -rf "$tmp" + # it's not necessary to clean up the temporary folder on CI because everything + # is cleaned up automatically when the job runner exits + if [ ! "${CI:-}" ]; then + rm -rf "$tmp" + fi + pkill -P "$$" || : exit "$exit_code"