Skip to content

Commit e666466

Browse files
authored
fix: database name not set error when using flag -d (#183)
* fix: database name not set error when using flag -d
1 parent d9d44c2 commit e666466

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ jobs:
182182
-e DB_USERNAME=user \
183183
-e DB_PASSWORD=password \
184184
-e GPG_PASSPHRASE=password \
185-
-e DB_NAME=testdb \
186-
${{ env.IMAGE_NAME }}:latest backup --disable-compression --custom-name encrypted-bkup
185+
${{ env.IMAGE_NAME }}:latest backup -d testdb --disable-compression --custom-name encrypted-bkup
187186
echo "Database encrypted backup completed"
188187
- name: Test restore encrypted backup | testdb -> testdb2
189188
run: |

pkg/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ func initBackupConfig(cmd *cobra.Command) *BackupConfig {
251251
utils.GetEnv(cmd, "cron-expression", "BACKUP_CRON_EXPRESSION")
252252
utils.GetEnv(cmd, "path", "REMOTE_PATH")
253253
utils.GetEnv(cmd, "config", "BACKUP_CONFIG_FILE")
254+
utils.GetEnv(cmd, "dbname", "DB_NAME")
254255
// Get flag value and set env
255256
remotePath := utils.GetEnvVariable("REMOTE_PATH", "SSH_REMOTE_PATH")
256257
storage = utils.GetEnv(cmd, "storage", "STORAGE")

0 commit comments

Comments
 (0)