File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -808,7 +808,23 @@ function Start-UnityEditor {
808
808
}
809
809
}
810
810
811
- New-Alias - Name gusi - Value Get-UnitySetupInstance
812
- New-Alias - Name gupi - Value Get-UnityProjectInstance
813
- New-Alias - Name susi - Value Select-UnitySetupInstance
814
- New-Alias - Name sue - Value Start-UnityEditor
811
+ @ (
812
+ @ { ' Name' = ' gusi' ; ' Value' = ' Get-UnitySetupInstance' },
813
+ @ { ' Name' = ' gupi' ; ' Value' = ' Get-UnityProjectInstance' },
814
+ @ { ' Name' = ' susi' ; ' Value' = ' Select-UnitySetupInstance' },
815
+ @ { ' Name' = ' sue' ; ' Value' = ' Start-UnityEditor' }
816
+ ) | ForEach-Object {
817
+
818
+ $alias = Get-Alias - Name $_.Name - ErrorAction ' SilentlyContinue'
819
+ if ( -not $alias ) {
820
+ Write-Verbose " Creating new alias $ ( $_.Name ) for $ ( $_.Value ) "
821
+ New-Alias @_
822
+ }
823
+ elseif ( $alias.ModuleName -eq ' UnitySetup' ) {
824
+ Write-Verbose " Setting alias $ ( $_.Name ) to $ ( $_.Value ) "
825
+ Set-Alias @_
826
+ }
827
+ else {
828
+ Write-Warning " Alias $ ( $_.Name ) already configured by $ ( $alias.Source ) "
829
+ }
830
+ }
You can’t perform that action at this time.
0 commit comments