Skip to content

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

Open

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions