From 85b76f525c4423c306c4d5b9481112174d39225b Mon Sep 17 00:00:00 2001 From: Mauro Balades Date: Tue, 23 Jul 2024 13:46:32 +0200 Subject: [PATCH] chore: Update disk-setup-and-swap.sh to conditionally execute 'free -h' and 'df -h' commands --- .github/workflows/src/disk-setup-and-swap.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/src/disk-setup-and-swap.sh b/.github/workflows/src/disk-setup-and-swap.sh index 623842d7b..e7ee08e54 100644 --- a/.github/workflows/src/disk-setup-and-swap.sh +++ b/.github/workflows/src/disk-setup-and-swap.sh @@ -1,7 +1,11 @@ echo Before: -free -h -df -h +if [ command -v free ]; then + free -h +fi +if [ command -v df ]; then + df -h +fi echo echo @@ -38,5 +42,9 @@ echo echo echo After: -free -h -df -h +if [ command -v free ]; then + free -h +fi +if [ command -v df ]; then + df -h +fi