Skip to content
Open
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
14 changes: 13 additions & 1 deletion pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ Function Import-FabricItems {
[hashtable]$fileOverrides
,
[hashtable]$itemProperties
,
[switch]$useDirNameAsProperties
)

# Search for folders with .pbir and .pbism in it
Expand Down Expand Up @@ -664,7 +666,17 @@ Function Import-FabricItems {
$displayName = $foundItemProperty.displayName
}
}


# Use the parent path to set the displayName and itemType, if useDirNameAsProperties parameter was set

if ($useDirNameAsProperties) {
if ($itemProperties -or (Test-Path -LiteralPath "$itemPath\.platform")){
Write-Host "itemProperties have been passed in or .platform file exists `n Will not set itemProperties based on path"}
else {
$displayName = $itemName.Split('.')[0]
$itemType = $itemName.Split('.')[1]}
}

# Try to read the item properties from the .platform file if not found in itemProperties

if ((!$itemType -or !$displayName) -and (Test-Path -LiteralPath "$itemPath\.platform")) {
Expand Down