unitysetup.powershell icon indicating copy to clipboard operation
unitysetup.powershell copied to clipboard

Start-Process call format for launching Unity Setup throws error when Set-PSDebug -Trace set to 2

Open nickhorvath opened this issue 7 years ago • 0 comments

in script do: Set-PSDebug -Trace 2

Call Install-UnitySetupInstance

Bug - the line $process = Start-Process @startProcessArgs has issues when Trace set to 2.

Cannot convert value to type System.String. At C:\Program Files\WindowsPowerShell\Modules\UnitySetup\4.0.97\UnitySetup.psm1:487 char:13

  •         $process = Start-Process @startProcessArgs
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvalidCastFromAnyTypeToString

perhaps consider using: Start-Process @startPRocessARgs -OutVariable $result | Out-Null

nickhorvath avatar Aug 08 '18 19:08 nickhorvath