Skip to content

Commit

Permalink
refactor: minor shellcheck improvements for start-database scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kasbah committed Apr 5, 2024
1 parent 62d1f67 commit c800237
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cli/template/extras/start-database/mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DB_CONTAINER_NAME="project1-mysql"

if ! [ -x "$(command -v docker)" ]; then
echo "Docker is not installed. Please install docker and try again.\nDocker install guide: https://docs.docker.com/engine/install/"
echo -e "Docker is not installed. Please install docker and try again.\nDocker install guide: https://docs.docker.com/engine/install/"
exit 1
fi

Expand All @@ -31,7 +31,7 @@ fi
set -a
source .env

DB_PASSWORD=$(echo $DATABASE_URL | awk -F':' '{print $3}' | awk -F'@' '{print $1}')
DB_PASSWORD=$(echo "$DATABASE_URL" | awk -F':' '{print $3}' | awk -F'@' '{print $1}')

if [ "$DB_PASSWORD" == "password" ]; then
echo "You are using the default database password"
Expand Down
4 changes: 2 additions & 2 deletions cli/template/extras/start-database/postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DB_CONTAINER_NAME="project1-postgres"

if ! [ -x "$(command -v docker)" ]; then
echo "Docker is not installed. Please install docker and try again.\nDocker install guide: https://docs.docker.com/engine/install/"
echo -e "Docker is not installed. Please install docker and try again.\nDocker install guide: https://docs.docker.com/engine/install/"
exit 1
fi

Expand All @@ -31,7 +31,7 @@ fi
set -a
source .env

DB_PASSWORD=$(echo $DATABASE_URL | awk -F':' '{print $3}' | awk -F'@' '{print $1}')
DB_PASSWORD=$(echo "$DATABASE_URL" | awk -F':' '{print $3}' | awk -F'@' '{print $1}')

if [ "$DB_PASSWORD" = "password" ]; then
echo "You are using the default database password"
Expand Down

0 comments on commit c800237

Please sign in to comment.