Skip to content

Commit 6057944

Browse files
feat: EZOut Container.init.ps1 ( Fixes #242 )
2 parents b6eedc4 + ebacbf8 commit 6057944

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

EZOut.commands.types.ps1xml

+15-2
Original file line numberDiff line numberDiff line change
@@ -3508,8 +3508,15 @@
35083508

35093509

35103510
$membersByType = @{}
3511+
$CommonParentPath = $null
35113512
foreach ($fp in $FilePath) {
35123513
$filePathRoot = Get-Item -Path $fp
3514+
if (-not $filePathRoot) { continue}
3515+
if (-not $CommonParentPath) {
3516+
$CommonParentPath = $filePathRoot.Parent.FullName
3517+
} elseif ($CommonParentPath) {
3518+
$CommonParentPath | Split-Path -CommonPrefix $filePathRoot
3519+
}
35133520
$filesBeneathRoot = Get-ChildItem -Recurse -Path $fp -Force
35143521

35153522
:nextFile foreach ($fileBeneathRoot in $filesBeneathRoot) {
@@ -3636,7 +3643,7 @@
36363643
}
36373644

36383645
# Do not Skip format/view/control files (this allows them to be in the same directory as types, if that is preferred)
3639-
$isFormatFile = $item.Name -match '\.(?>format|view|control)\.ps1$'
3646+
$isFormatFile = $item.Name -match '\.(?>format|view|control)\.ps1$'
36403647

36413648
$itemName =
36423649
$item.Name.Substring(0, $item.Name.Length - $item.Extension.Length)
@@ -3777,6 +3784,12 @@
37773784
}
37783785
}
37793786

3787+
.sql {
3788+
if (-not $noteProperty.Contains($itemName)) # SQL files become note properties.
3789+
{
3790+
$noteProperty[$itemName] = $fileText
3791+
}
3792+
}
37803793

37813794
#endregion .txt Files
37823795
#region .psd1 Files
@@ -3831,7 +3844,7 @@ return `$convertedFromJson
38313844
"@)
38323845
}
38333846
}
3834-
#endregion JSON files
3847+
#endregion JSON files
38353848
#region CliXML files
38363849
# Clixml files are embedded into a ScriptProperty and Deserialized.
38373850
.clixml {

0 commit comments

Comments
 (0)