File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
testcases/ground-to-cloud Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,17 @@ echo "Authenticating with UiPath..."
1919uv run uipath auth --client-id=" $CLIENT_ID " --client-secret=" $CLIENT_SECRET " --base-url=" $BASE_URL "
2020
2121echo " 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
2434echo " Run init..."
2535uv run uipath init
You can’t perform that action at this time.
0 commit comments