From 3f3b8547a1598cad7f183144ddbb9ca93a891fb5 Mon Sep 17 00:00:00 2001 From: Filipi Fuchter Date: Fri, 28 Nov 2025 06:01:23 -0300 Subject: [PATCH] Ignoring local dev variable when deploying the agent. --- examples/aws-agentcore/scripts/launch.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/aws-agentcore/scripts/launch.sh b/examples/aws-agentcore/scripts/launch.sh index 5a90e86d1..dfef1a66c 100755 --- a/examples/aws-agentcore/scripts/launch.sh +++ b/examples/aws-agentcore/scripts/launch.sh @@ -1,3 +1,4 @@ + #!/bin/bash # Script to dynamically read all variables from .env file and launch agentcore @@ -27,6 +28,12 @@ while IFS= read -r line || [ -n "$line" ]; do VAR_NAME=$(echo "$line" | cut -d'=' -f1 | xargs) VAR_VALUE=$(echo "$line" | cut -d'=' -f2- | xargs) + # Skip PIPECAT_LOCAL_DEV variable + if [[ "$VAR_NAME" == "PIPECAT_LOCAL_DEV" ]]; then + echo " Skipping: $VAR_NAME (ignored for deployment)" + continue + fi + # Skip if variable name or value is empty if [[ -n "$VAR_NAME" && -n "$VAR_VALUE" ]]; then # Add to launch command @@ -37,7 +44,7 @@ while IFS= read -r line || [ -n "$line" ]; do done < ".env" # Check if any environment variables were added -if [[ "$LAUNCH_CMD" == "agentcore launch" ]]; then +if [[ "$LAUNCH_CMD" == "agentcore launch --auto-update-on-conflict" ]]; then echo "Warning: No valid environment variables found in .env file" echo "Make sure your .env file contains variables in the format: KEY=value" exit 1