Skip to content

Commit

Permalink
Get artifact from settings during localdevenv (#742)
Browse files Browse the repository at this point in the history
When I run localdevenv from latest preview I get the following:

_No performance test apps found in bcptTestFolders in
.AL-Go\settings.json
Checking appDependencyProbingPaths
Error: The variable '$repo' cannot be retrieved because it has not been
set.
Stacktrace: at CreateDevEnv,
C:\Users\UserName\AppData\Local\Temp\tmp71A1.tmp.ps1: line 1647_

**Suggested fix**
Getting artifact from $settings.artifact rather than $repo.artifact 

Additionally, add an option to accept insider eula when invoking
localdevenv
  • Loading branch information
aholstrup1 authored Sep 29, 2023
1 parent b47f003 commit 460e558
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Actions/AL-Go-Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ function CreateDevEnv {
$settings = AnalyzeRepo -settings $settings -baseFolder $baseFolder -project $project @params
$settings = CheckAppDependencyProbingPaths -settings $settings -baseFolder $baseFolder -project $project

if (!$accept_insiderEula -and ($repo.artifact -like 'https://bcinsider.blob.core.windows.net/*' -or $repo.artifact -like 'https://bcinsider.azureedge.net/*')) {
if (!$accept_insiderEula -and ($settings.artifact -like 'https://bcinsider.blob.core.windows.net/*' -or $settings.artifact -like 'https://bcinsider.azureedge.net/*')) {
Read-Host 'Press ENTER to accept the Business Central insider EULA (https://go.microsoft.com/fwlink/?linkid=2245051) or break the script to cancel'
$accept_insiderEula = $true
}
Expand Down
6 changes: 4 additions & 2 deletions Templates/AppSource App/.AL-Go/localDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Param(
[string] $auth = "",
[pscredential] $credential = $null,
[string] $licenseFileUrl = "",
[switch] $fromVSCode
[switch] $fromVSCode,
[switch] $accept_insiderEula
)

$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
Expand Down Expand Up @@ -129,7 +130,8 @@ CreateDevEnv `
-project $project `
-auth $auth `
-credential $credential `
-licenseFileUrl $licenseFileUrl
-licenseFileUrl $licenseFileUrl `
-accept_insiderEula:$accept_insiderEula
}
catch {
Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)"
Expand Down
6 changes: 4 additions & 2 deletions Templates/Per Tenant Extension/.AL-Go/localDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Param(
[string] $auth = "",
[pscredential] $credential = $null,
[string] $licenseFileUrl = "",
[switch] $fromVSCode
[switch] $fromVSCode,
[switch] $accept_insiderEula
)

$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
Expand Down Expand Up @@ -129,7 +130,8 @@ CreateDevEnv `
-project $project `
-auth $auth `
-credential $credential `
-licenseFileUrl $licenseFileUrl
-licenseFileUrl $licenseFileUrl `
-accept_insiderEula:$accept_insiderEula
}
catch {
Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)"
Expand Down

0 comments on commit 460e558

Please sign in to comment.