EOS-Solutions / Gordon

Repository to manage Issues related to Gordon apps
0 stars 0 forks source link

Container Wizard - generated script throws error when selecting additional parameters #40

Closed AndreaAntolini closed 3 months ago

AndreaAntolini commented 3 months ago

Describe the bug When using Container Wizard and selecting any additional parameters, the generated script in powershell throws an error:

You have to accept the eula (See https://go.microsoft.com/fwlink/?linkid=861843) by specifying the -accept_eula switch to the function...

To Reproduce Steps to reproduce the behavior:

  1. Go to "Container Wizard"
  2. Basic Parameters: image
  3. Advanced Parameters:image
  4. Click on "DONE" to copy the script
  5. paste into powershell ISE

Generated Script

$containerName = 'BC-TEST' $version = '24.0' $Country = 'it' $LicenseFile = 'C:\Users\Aantolini\Documents\Licenses\EOS\EOSBCCURRENT4DEV.bclicense'

$credential = get-credential -Message 'insert your credential for the container'

$artifactUrl = Get-BCArtifactUrl -country $Country.ToLower() -type onprem -version $version -select Latest

$parameters = @{ 'accept_eula' = $true 'accept_outdated' = $true 'alwaysPull' = $true 'updateHosts' = $true 'assignPremiumPlan' = $true 'doNotExportObjectsToText' = $true 'artifactUrl' = $artifactUrl 'auth' = 'NavUserPassword' 'containerName' = $containerName 'licenseFile' = $LicenseFile 'dns' = '8.8.8.8' 'shortcut' = 'None' 'Credential' = $credential }

$Test = @{ 'includeTestLibrariesOnly' = $true 'includeTestToolkit' = $true } $SSL = @{ 'useSSL' = $true 'installCertificateOnHost' = $true } $Font = @{ 'addFontsFromPath' = 'C:\Windows\Fonts' } $IncludeTests = $true $UseSSL = $false $InstallFonts = $false

if($IncludeTests){ $parameters = $($parameters; $Test) } if($UseSSL){ $parameters = $($parameters; $SSL) } if($InstallFonts){ $parameters = $($parameters; $Font) } New-BCContainer @parameters

iex ". { $(irm https://raw.githubusercontent.com/EOS-Solutions/Scripts/master/Smeagol/install-labs.ps1 -Headers @{"Cache-Control" = "no-cache"}) }"

Powershell output New-BCContainer Telemetry Correlation Id: e7a877c7-3243-426c-815e-6e0417ca2b83 You have to accept the eula (See https://go.microsoft.com/fwlink/?linkid=861843) by specifying the -accept_eula switch to the function In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.15\ContainerHandling\New-NavContainer.ps1:346 car:9

Product