jabbera / my-vsts-tasks

20 stars 18 forks source link

Service account passwords with space characters #50

Open luke-barnett opened 4 years ago

luke-barnett commented 4 years ago

I'm having issues with passwords with space characters in them and not sure what is needed to escape them?

When running the same command as the release task and changing the password variable input to be -password "p@ss w0rd" instead of -password:"p@ss w0rd" it starts working flawlessly.

aminm-net commented 3 years ago

I am the second on this, I have faced it yesterday. The issue appears on task version 8 as the script generated by the task looks like the following:

MyTopShelfService.exe" install -username "MyUserName" -password:"***"

While the above works perfectly fine in windows command prompt it fails if you run it with windows PowerShel.

To fix, the final script should be like: (look at the colon instead of space after username switch)

MyTopShelfService.exe" install -username:"MyUserName" -password:"***"

I have made the necessary change in the code created a pull request (#51) which fixes this issue, please have a look @jabbera

topshelfissue topshelfissue2