From df5b56f30b5839f2d3e669c9a63d73804a286917 Mon Sep 17 00:00:00 2001 From: alenmestrov Date: Mon, 23 Dec 2024 14:58:58 +0100 Subject: [PATCH] fix: check if canister_ids.json file exists before trying to delete it --- contracts/icp/context-config/deploy_devnet.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contracts/icp/context-config/deploy_devnet.sh b/contracts/icp/context-config/deploy_devnet.sh index 9f1166036..69d608d9b 100755 --- a/contracts/icp/context-config/deploy_devnet.sh +++ b/contracts/icp/context-config/deploy_devnet.sh @@ -37,15 +37,16 @@ dfx identity use default # Stop dfx and clean up all state dfx stop -sleep 2 rm -rf .dfx rm -rf ~/.config/dfx/replica-configuration/ rm -rf ~/.cache/dfinity/ -rm canister_ids.json +# Remove canister_ids.json if it exists +if [ -f "canister_ids.json" ]; then + rm canister_ids.json +fi # Start dfx with clean state dfx start --clean --background -sleep 5 # Define canister IDs CONTEXT_ID="br5f7-7uaaa-aaaaa-qaaca-cai"