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
497
497
#>
498
498
function Start-UnityEditor
499
499
{
500
- [CmdletBinding (DefaultParameterSetName = " Context" )]
500
+ [CmdletBinding (SupportsShouldProcess , DefaultParameterSetName = " Context" )]
501
501
param (
502
502
[parameter (Mandatory = $false , ValueFromPipeline = $true , ParameterSetName = ' Projects' )]
503
503
[parameter (Mandatory = $true , ValueFromPipeline = $true , ParameterSetName = ' ProjectsLatest' )]
@@ -666,7 +666,11 @@ function Start-UnityEditor
666
666
$setProcessArgs [' ArgumentList' ] = $unityArgs
667
667
}
668
668
669
- Write-Verbose " Starting $editor $unityArgs "
669
+ if (-not $PSCmdlet.ShouldProcess (" $editor $unityArgs " , " Start-Process" ))
670
+ {
671
+ continue
672
+ }
673
+
670
674
$process = Start-Process @setProcessArgs
671
675
if ( $Wait )
672
676
{
You can’t perform that action at this time.
0 commit comments