Skip to content

Commit 92b1221

Browse files
committed
test3
1 parent 8411751 commit 92b1221

File tree

1 file changed

+3
-8
lines changed
  • testcases/ground-to-cloud

1 file changed

+3
-8
lines changed

testcases/ground-to-cloud/run.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,10 @@ uv sync
1818
echo "Authenticating with UiPath..."
1919
uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --base-url="$BASE_URL"
2020

21-
echo "Overwriting UIPATH_ACCESS_TOKEN with PAT_TOKEN..."
22-
# Use grep and temp file approach to handle any special characters safely
21+
# Now overwrite just the ACCESS_TOKEN with PAT_TOKEN
2322
if [ -n "$PAT_TOKEN" ]; then
24-
# Create a temporary file without the UIPATH_ACCESS_TOKEN line
25-
grep -v "^UIPATH_ACCESS_TOKEN=" .env > .env.tmp
26-
# Add the new token line
27-
echo "UIPATH_ACCESS_TOKEN=$PAT_TOKEN" >> .env.tmp
28-
# Replace the original file
29-
mv .env.tmp .env
23+
# Use sed to replace only the active UIPATH_ACCESS_TOKEN line (not commented ones)
24+
sed -i "s|^UIPATH_ACCESS_TOKEN=.*|UIPATH_ACCESS_TOKEN=$PAT_TOKEN|" .env
3025
else
3126
echo "Warning: PAT_TOKEN environment variable is not set!"
3227
fi

0 commit comments

Comments
 (0)