Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve start-databse scripts exit and messages #1816

Merged
merged 2 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: minor shellcheck improvements for start-database scripts
  • Loading branch information
kasbah committed Apr 5, 2024
commit c800237682b810dab5b62b6e581e36f83088410d
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
Loading