0
0
Fork 0
mirror of https://github.com/tj-actions/pg-dump.git synced 2024-12-20 01:18:49 +00:00

Updated to check for the output dir

This commit is contained in:
Tonye Jack 2023-09-08 01:54:30 +00:00
parent 04f93bed1f
commit f2a266a51d

View file

@ -4,11 +4,15 @@ set -euo pipefail
echo "::group::pg-dump"
echo "Creating the output directory..."
echo "Checking if the output directory exists..."
mkdir -p "$(dirname "$INPUT_PATH")"
echo "Created the output directory"
if [ ! -d "$(dirname "$INPUT_PATH")" ]; then
echo "The output directory does not exist. Creating it..."
mkdir -p "$(dirname "$INPUT_PATH")"
echo "Created the output directory"
else
echo "The output directory already exists"
fi
if [[ -n "$INPUT_POSTGRESQL_VERSION" ]]; then
echo "Verifying version"