Skip to content

Dev/export package support #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion UnitySetup/UnitySetup.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
RootModule = 'UnitySetup'

# Version number of this module.
ModuleVersion = '2.1'
ModuleVersion = '2.2'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
7 changes: 5 additions & 2 deletions UnitySetup/UnitySetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ function Start-UnityEditor
[parameter(Mandatory=$false)]
[string]$ExecuteMethod,
[parameter(Mandatory=$false)]
[string[]]$ExportPackage,
[parameter(Mandatory=$false)]
[string]$OutputPath,
[parameter(Mandatory=$false)]
[string]$LogFile,
Expand Down Expand Up @@ -646,6 +648,7 @@ function Start-UnityEditor
if( $BuildTarget ) { $sharedArgs += "-buildTarget", $BuildTarget }
if( $BatchMode ) { $sharedArgs += "-batchmode" }
if( $Quit ) { $sharedArgs += "-quit" }
if( $ExportPackage ) { $sharedArgs += "-exportPackage","$ExportPackage" }

$instanceArgs = @()
foreach( $p in $projectInstances ) {
Expand Down Expand Up @@ -711,9 +714,9 @@ function Start-UnityEditor
$process.WaitForExit();
if( $process.ExitCode -ne 0 )
{
if( $LogFile )
if( $LogFile -and (Test-Path $LogFile -Type Leaf) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should -Type here be -PathType instead?

{
Get-Content $LogFile | Write-Information
Get-Content $LogFile | ForEach-Object { Write-Information -MessageData $_ -Tags 'Logs' }
}

Write-Error "Unity quit with non-zero exit code"
Expand Down