From 2dc0fe3b31d3fe38a6fd24d2e43b111d5bbdd8e9 Mon Sep 17 00:00:00 2001 From: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com> Date: Thu, 21 Jan 2021 11:49:27 -0800 Subject: [PATCH] Bwsh surpress warnings (#1084) * surpessing the missing docker networks message in the bash script when the docker-compose project is already down * surpressing the missing docker network warnings in the powershell script --- scripts/run.ps1 | 4 +++- scripts/run.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/run.sh diff --git a/scripts/run.ps1 b/scripts/run.ps1 index ae666b5785..23ae2adf3b 100644 --- a/scripts/run.ps1 +++ b/scripts/run.ps1 @@ -83,7 +83,9 @@ function Docker-Compose-Up { function Docker-Compose-Down { Docker-Compose-Files - Invoke-Expression ("docker-compose down{0}" -f "") #TODO: qFlag + if ((Invoke-Expression ("docker-compose ps{0}" -f "") | Measure-Object -Line).lines -gt 2 ) { + Invoke-Expression ("docker-compose down{0}" -f "") #TODO: qFlag + } } function Docker-Compose-Pull { diff --git a/scripts/run.sh b/scripts/run.sh old mode 100644 new mode 100755 index 0b6c185987..0fdca4524b --- a/scripts/run.sh +++ b/scripts/run.sh @@ -91,7 +91,9 @@ function dockerComposeUp() { function dockerComposeDown() { dockerComposeFiles - docker-compose down + if [ $(docker-compose ps | wc -l) -gt 2 ]; then + docker-compose down + fi } function dockerComposePull() {