File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
testcases/ground-to-cloud Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,10 @@ uv sync
1818echo " Authenticating with UiPath..."
1919uv 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
2322if [ -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
3025else
3126 echo " Warning: PAT_TOKEN environment variable is not set!"
3227fi
You can’t perform that action at this time.
0 commit comments