Skip to content

Build fails when VSTS Agent has a space character in it's working directory #1075

@alexmbaker

Description

@alexmbaker

My build works fine on a hosted agent however our local agent is installed at 'd:\Apps\VSTS Agent'. It looks like the arguments passed to GitVersion.exe have not been quoted so it is getting a bit confused.

This causes the build to fail.

The relevant bit of the build log file:

2016-10-31T02:28:31.9254640Z Current Directory:  D:\Apps\VSTS Agent\_work\_tasks\GitVersion_e5983830-3f75-11e5-82ed-81492570a08e\3.6.3
2016-10-31T02:28:31.9264643Z 
2016-10-31T02:28:31.9264643Z 
2016-10-31T02:28:31.9264643Z Sources Directory:  D:\Apps\VSTS Agent\_work\1\s
2016-10-31T02:28:31.9264643Z 
2016-10-31T02:28:31.9264643Z 
2016-10-31T02:28:31.9354715Z Invoking GitVersion with D:\Apps\VSTS Agent\_work\1\s /output buildserver /nofetch /updateassemblyinfo true
2016-10-31T02:28:31.9354715Z 
2016-10-31T02:28:31.9354715Z 
2016-10-31T02:28:31.9404729Z D:\Apps\VSTS Agent\_work\_tasks\GitVersion_e5983830-3f75-11e5-82ed-81492570a08e\3.6.3\GitVersion.exe D:\Apps\VSTS Agent\_work\1\s /output buildserver /nofetch /updateassemblyinfo true
2016-10-31T02:28:31.9424756Z ##[debug]Entering ProcessWrapper.CreateStartInfo
2016-10-31T02:28:31.9434751Z ##[debug]   workingFolder = 
2016-10-31T02:28:31.9434751Z ##[debug]   filename = D:\Apps\VSTS Agent\_work\_tasks\GitVersion_e5983830-3f75-11e5-82ed-81492570a08e\3.6.3\GitVersion.exe
2016-10-31T02:28:31.9434751Z ##[debug]   arguments = D:\Apps\VSTS Agent\_work\1\s /output buildserver /nofetch /updateassemblyinfo true
2016-10-31T02:28:31.9434751Z ##[debug]Leaving ProcessWrapper.CreateStartInfo
2016-10-31T02:28:31.9454765Z ##[debug]ProcessWrapper.Start - enter
2016-10-31T02:28:31.9454765Z ##[debug]ProcessWrapper.Start - starting process
2016-10-31T02:28:31.9484786Z ##[debug]ProcessWrapper.Start - process started
2016-10-31T02:28:31.9514820Z ##[debug]ProcessWrapper.Start - leave
2016-10-31T02:28:32.0035183Z WARN [10/31/16 13:28:31:99] The working directory 'D:\Apps\VSTS' does not exist.
2016-10-31T02:28:32.0035183Z INFO [10/31/16 13:28:32:00] IsDynamicGitRepository: False
2016-10-31T02:28:32.0185294Z ERROR [10/31/16 13:28:32:01] An unexpected error occurred:

I will try to fix the issue and submit a pull request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions