add env variable for installer path for Unity #111#127
add env variable for installer path for Unity #111#127abhinuvpitale wants to merge 6 commits intomicrosoft:developfrom
Conversation
|
@jwittner Is this the right way to add the variables? |
|
updated! |
UnitySetup/UnitySetup.psm1
Outdated
| } | ||
| else { | ||
| Write-Verbose "$(Get-Date): Succeeded." | ||
| [Environment]::SetEnvironmentVariable("UNITY_"+$version, $destPath, [System.EnvironmentVariableTarget]::User) |
There was a problem hiding this comment.
nit: you can put $version inside the quotes like so "UNITY_$version", no need to change this for approval
UnitySetup/UnitySetup.psm1
Outdated
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Nit: Extra white space trailing the end here isn't needed.
UnitySetup/UnitySetup.psm1
Outdated
| } | ||
| else { | ||
| Write-Verbose "$(Get-Date): Succeeded." | ||
| [Environment]::SetEnvironmentVariable("UNITY_$($i.Version)", $Destination, [System.EnvironmentVariableTarget]::User) |
There was a problem hiding this comment.
Actually, $i.Version is empty string at this point since we're in a different loop from above. You'll need to cache that string for this install process later. Are you having issues testing locally to verify this code works?
In my macOS PR this entire flow is changing and should be easier to get the correct version for this.
|
Not being able to properly setup to test the envir! |
|
What OS are you on? Testing should be as simple as running these three commands from the root of the repository while in PowerShell. Import-Module .\UnitySetup\UnitySetup.psm1
$installers = Find-UnitySetupInstaller -Version 2017.4.8f1 -Components Windows, Vuforia
Install-UnitySetupInstance -Installers $installersVisual Studio Code has good debugging options if you need to put breakpoints and step through your code and watch variables. Just make sure to install the PowerShell extension. Should prompt you if you open that file in VS Code. |

No description provided.