From bf5f84715b701830fa7442c85187c977b17c35b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Sun, 12 Oct 2025 10:39:14 +0200 Subject: [PATCH 1/2] fix(Write-MyHost): accept ForegroundColor param and use it when calling Write-ToConsole --- include/MyWrite.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/MyWrite.ps1 b/include/MyWrite.ps1 index 66a0155..4d31625 100644 --- a/include/MyWrite.ps1 +++ b/include/MyWrite.ps1 @@ -50,11 +50,11 @@ function Write-MyHost { [Alias("Write-Host")] param( [Parameter(ValueFromPipeline)][string]$Message, - #NoNewLine + [Parameter()][string]$ForegroundColor = $OUTPUT_COLOR, [Parameter()][switch]$NoNewLine ) # Write-Host $message -ForegroundColor $OUTPUT_COLOR - Write-ToConsole $message -Color $OUTPUT_COLOR -NoNewLine:$NoNewLine + Write-ToConsole $message -Color $ForegroundColor -NoNewLine:$NoNewLine } function Write-MyDebug { @@ -199,3 +199,5 @@ function Get-ObjetString { return $Object | ConvertTo-Json -Depth 10 -ErrorAction SilentlyContinue } } + + From 4989288774c9fd997f632d2a551afef8cc132d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Sun, 12 Oct 2025 10:42:48 +0200 Subject: [PATCH 2/2] fix(invokeCommand.mock): increase ConvertFrom-Json depth to 100 for Get-MockFileContentJson --- Test/include/invokeCommand.mock.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Test/include/invokeCommand.mock.ps1 b/Test/include/invokeCommand.mock.ps1 index 9fbd479..0200065 100644 --- a/Test/include/invokeCommand.mock.ps1 +++ b/Test/include/invokeCommand.mock.ps1 @@ -134,7 +134,7 @@ function Get-MockFileContentJson{ Assert-MockFileNotfound $FileName - $content = Get-MockFileContent -fileName $filename | ConvertFrom-Json -AsHashtable:$AsHashtable -Depth 10 + $content = Get-MockFileContent -fileName $filename | ConvertFrom-Json -AsHashtable:$AsHashtable -Depth 100 return $content } Export-ModuleMember -Function Get-MockFileContentJson @@ -255,3 +255,5 @@ function Assert-MockFileNotfound{ throw "File not found or wrong case name. Expected[ $filename ] - Found[$( $file.name )]" } } + +