Skip to content

Commit 9bc1f5f

Browse files
authored
fail early if app.json isn't valid (#3919)
Give a better error in a situation like microsoft/AL-Go#1695 Co-authored-by: freddydk <freddydk@users.noreply.github.com>
1 parent d01ea11 commit 9bc1f5f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

AppHandling/Sort-AppFoldersByDependencies.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ try {
5656
}
5757
else {
5858
$appJson =[System.IO.File]::ReadAllLines($appJsonFile) | ConvertFrom-Json
59-
59+
if (-not $appJson) {
60+
throw "$appJsonFile isn't a valid json file."
61+
}
6062
# replace id with appid
6163
if ($appJson.psobject.Members | Where-Object name -eq "dependencies") {
6264
if ($appJson.dependencies) {

ReleaseNotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
6.1.5
22
Include AuthContext and Environment in Parameters for InstallMissingDependencies when called from Run-AlPipeline
3+
AL-Go issue 1695 Fail early if app.json cannot be read
34

45
6.1.4
56
Issue 3882 Run-AlPipeline with CompilerFolder and Container defined fails when running tests

0 commit comments

Comments
 (0)