From d1e24fa7eb15db1e1d6f8a81fb0f10795c1e0c5d Mon Sep 17 00:00:00 2001 From: lksz Date: Sat, 23 Jan 2021 22:07:36 -0500 Subject: [PATCH] dcc -OnlyTest switch now works --- docker/Edit-DockerCompose.ps1 | 2 +- docker/dcc.ps1 | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Edit-DockerCompose.ps1 b/docker/Edit-DockerCompose.ps1 index 5efefad..41f332b 100644 --- a/docker/Edit-DockerCompose.ps1 +++ b/docker/Edit-DockerCompose.ps1 @@ -51,4 +51,4 @@ $FinalEditList = @() + $FinalEditList + @() + $AdditionalFiles Edit-TextFile $FinalEditList -$editFiles | Select-Object -First 1 | ForEach-Object { docker-compose --file $(Resolve-Path $_) config -q } +dcc -ProjectPath $ProjectPath -TestOnly diff --git a/docker/dcc.ps1 b/docker/dcc.ps1 index 2d2f3cb..58f2839 100644 --- a/docker/dcc.ps1 +++ b/docker/dcc.ps1 @@ -8,7 +8,11 @@ ) [DockerComposeDirs]::_GetValidValues($wordToComplete,$true) })] - [string[]]$ProjectPath=@($PWD) + [string[]]$ProjectPath=@($PWD), + [switch]$TestOnly ) -Invoke-DockerCompose -ProjectPath $ProjectPath 'config' | Out-String -Stream | less +$local:out = Invoke-DockerCompose -ProjectPath $ProjectPath 'config' | Out-String -Stream +if( -not $TestOnly ) { + $out | less +}