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() {