diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f613f8934..1fc10b7fb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: - name: Remove all local Vagrant boxes if: always() # do this even if a step before has failed - run: if vagrant box list &> /dev/null; then vagrant box list | cut -f 1 -d ' ' | xargs -L 1 vagrant box remove -f; echo "All Vagrant boxes removed."; else echo "No Vagrant boxes found."; fi + run: if vagrant box list 2>/dev/null; then vagrant box list | cut -f 1 -d ' ' | xargs -L 1 vagrant box remove -f 2>/dev/null && echo "All Vagrant boxes removed." || echo "No Vagrant boxes found."; else echo "No Vagrant boxes found."; fi - name: Remove all Virtualbox VMs if: always() # do this even if a step before has failed @@ -96,7 +96,7 @@ jobs: - name: Remove all local Vagrant boxes if: always() # do this even if a step before has failed - run: if vagrant box list &> /dev/null; then vagrant box list | cut -f 1 -d ' ' | xargs -L 1 vagrant box remove -f; echo "All Vagrant boxes removed."; else echo "No Vagrant boxes found."; fi + run: if vagrant box list 2>/dev/null; then vagrant box list | cut -f 1 -d ' ' | xargs -L 1 vagrant box remove -f 2>/dev/null && echo "All Vagrant boxes removed." || echo "No Vagrant boxes found."; else echo "No Vagrant boxes found."; fi - name: Remove all Virtualbox VMs if: always() # do this even if a step before has failed