Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Fix for GH #2006, Cleaner and handles case of non present env variables (#2116)

Eric Bariaux3e7b4e6eaedf
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index 6598a283a..08ceb9c2d 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -842,9 +842,9 @@ jobs:
failure = False
# Clean-up AWS credentials related variable that might have been set by Configure AWS Credentials for ECR upload
- del os.environ["AWS_ACCESS_KEY_ID"]
- del os.environ["AWS_SECRET_ACCESS_KEY"]
- del os.environ["AWS_SESSION_TOKEN"]
+ os.environ.pop("AWS_ACCESS_KEY_ID", None)
+ os.environ.pop("AWS_SECRET_ACCESS_KEY", None)
+ os.environ.pop("AWS_SESSION_TOKEN", None)
# Determine deploy script to use
deployScript = ".ci_cd/deploy.sh"