Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Service account passwords with space characters #50

Open
luke-barnett opened this issue May 27, 2020 · 1 comment
Open

Service account passwords with space characters #50

luke-barnett opened this issue May 27, 2020 · 1 comment

Comments

@luke-barnett
Copy link

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 added a commit to aminm-net/my-vsts-tasks that referenced this issue Sep 10, 2020
To fix the issue  jabbera#50 raised on May 28 by @luke-barnett  

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 and in older task versions (probably due to a different version in PowerShell there), 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:"***"
@aminm-net
Copy link

aminm-net commented Sep 10, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants