File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ function Get-UnityProjectInstance
497497#>
498498function Start-UnityEditor
499499{
500- [CmdletBinding (DefaultParameterSetName = " Context" )]
500+ [CmdletBinding (SupportsShouldProcess , DefaultParameterSetName = " Context" )]
501501 param (
502502 [parameter (Mandatory = $false , ValueFromPipeline = $true , ParameterSetName = ' Projects' )]
503503 [parameter (Mandatory = $true , ValueFromPipeline = $true , ParameterSetName = ' ProjectsLatest' )]
@@ -666,7 +666,11 @@ function Start-UnityEditor
666666 $setProcessArgs [' ArgumentList' ] = $unityArgs
667667 }
668668
669- Write-Verbose " Starting $editor $unityArgs "
669+ if (-not $PSCmdlet.ShouldProcess (" $editor $unityArgs " , " Start-Process" ))
670+ {
671+ continue
672+ }
673+
670674 $process = Start-Process @setProcessArgs
671675 if ( $Wait )
672676 {
You can’t perform that action at this time.
0 commit comments