Skip to content

Commit fa5448e

Browse files
committed
test
1 parent 06cd007 commit fa5448e

File tree

1 file changed

+11
-1
lines changed
  • testcases/ground-to-cloud

1 file changed

+11
-1
lines changed

testcases/ground-to-cloud/run.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,17 @@ echo "Authenticating with UiPath..."
1919
uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --base-url="$BASE_URL"
2020

2121
echo "Overwriting UIPATH_ACCESS_TOKEN with PAT_TOKEN..."
22-
sed -i "s/^UIPATH_ACCESS_TOKEN=.*/UIPATH_ACCESS_TOKEN=$PAT_TOKEN/" .env
22+
# Use grep and temp file approach to handle any special characters safely
23+
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
30+
else
31+
echo "Warning: PAT_TOKEN environment variable is not set!"
32+
fi
2333

2434
echo "Run init..."
2535
uv run uipath init

0 commit comments

Comments
 (0)