You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize the documentation states that the section "CustomRequirementRule" will be further documented in the future, but I went ahead and defined the required variables in a app.json file as this was desired in my particular case for Dell Command | Update. (My custom requrement rule variables and values where based off of the expected variables in the switch statement starting on line 350 of New-Win32App.ps1)
When New-Win32App.ps1 is running and has app.json has custom requirement rule script files defined, the pipeline will fail because the script file is missing in the Scripts folder. After investigating this my conclusion is that the Prepare-AppPackageFolder.ps1 should process each custom requirement rule with script files while processing "app.json" (line 110) in the switch statement.
Adding the following to line 110 in Prepare-AppPackageFolder.ps1 did the trick for me:
# Copy custom requirement rule script files to script destination folderforeach ( $CustomRequirementRuleScriptin$($AppFileContent.CustomRequirementRule|Where-Object {$_.Type-eq"Script" } ) ) {
# Create the Scripts folder in the app package folder in the publish root folder$AppPublishScriptsFolderPath=Join-Path-Path $AppPublishFolderPath-ChildPath "Scripts"$ScriptFileSource=Join-Path$AppPackageFolderPath-ChildPath $CustomRequirementRuleScript.ScriptFile$ScriptFileDestination=Join-Path-Path $AppPublishScriptsFolderPath-ChildPath $CustomRequirementRuleScript.ScriptFileif (-not(Test-Path-Path $AppPublishScriptsFolderPath)) {
try {
$null=New-Item-Path $AppPublishScriptsFolderPath-ItemType "Directory"-Force -Confirm:$false
}
catch [System.Exception] {
Write-Warning"Failed to create folder [$AppPublishFolderPath] with message: [$($_.Exception.Message)]"
}
}
try {
Write-Output"Copying custom requirement rule script file from: [$ScriptFileSource] to: [$ScriptFileDestination]"$null=Copy-Item-Path $ScriptFileSource-Destination $ScriptFileDestination-Force -ErrorAction Stop
}
catch [System.Exception] {
Write-Warning"Failed to copy custom requirement rule script with message: [$($_.Exception.Message)]"
}
}
The text was updated successfully, but these errors were encountered:
I realize the documentation states that the section "CustomRequirementRule" will be further documented in the future, but I went ahead and defined the required variables in a app.json file as this was desired in my particular case for Dell Command | Update. (My custom requrement rule variables and values where based off of the expected variables in the switch statement starting on line 350 of New-Win32App.ps1)
When New-Win32App.ps1 is running and has app.json has custom requirement rule script files defined, the pipeline will fail because the script file is missing in the Scripts folder. After investigating this my conclusion is that the Prepare-AppPackageFolder.ps1 should process each custom requirement rule with script files while processing "app.json" (line 110) in the switch statement.
Adding the following to line 110 in Prepare-AppPackageFolder.ps1 did the trick for me:
The text was updated successfully, but these errors were encountered: