Skip to content

Commit eee7cfe

Browse files
fix
Handling paths with spaces.
1 parent dcf9a26 commit eee7cfe

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apiupdaterproject/run-upgrade-test.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,17 @@ try {
113113

114114
if (Test-Path $logFile) { Remove-Item -Force $logFile }
115115

116+
# Start-Process joins -ArgumentList into one command line without quoting the individual values,
117+
# and ProcessStartInfo.ArgumentList does not exist on the .NET Framework that Windows PowerShell
118+
# runs on - so quote the two paths here or a checkout under "C:\Users\Jane Doe\..." splits at the
119+
# space and Unity receives an invalid -projectPath/-logFile.
116120
$unityArgs = @(
117121
'-batchmode', '-nographics', '-quit',
118122
'-accept-apiupdate',
119123
'-ignoreCompilerErrors',
120124
'-burst-disable-compilation',
121-
'-projectPath', $projectPath,
122-
'-logFile', $logFile
125+
'-projectPath', "`"$projectPath`"",
126+
'-logFile', "`"$logFile`""
123127
)
124128

125129
Write-Host 'Running the editor (this imports the project and runs the API updater)...'

0 commit comments

Comments
 (0)