Skip to content

Commit

Permalink
fix: the configuration file path is not being detected when it is enc…
Browse files Browse the repository at this point in the history
…losed in quotes
  • Loading branch information
jkaninda committed Jan 12, 2025
1 parent 1b60ca6 commit 2c3f2f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build
on:
push:
branches: ['develop']
branches: ['nightly']
env:
BUILDKIT_IMAGE: jkaninda/mysql-bkup
jobs:
Expand All @@ -28,7 +28,7 @@ jobs:
file: "./Dockerfile"
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: |
appVersion=develop-${{ github.sha }}
appVersion=nightly
tags: |
"${{vars.BUILDKIT_IMAGE}}:develop-${{ github.sha }}"
"${{vars.BUILDKIT_IMAGE}}:nightly"
2 changes: 1 addition & 1 deletion pkg/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func BackupTask(db *dbConfig, config *BackupConfig) {
}
}
func startMultiBackup(bkConfig *BackupConfig, configFile string) {
utils.Info("Starting backup task...")
utils.Info("Starting Multi backup task...")
conf, err := readConf(configFile)
if err != nil {
utils.Fatal("Error reading config file: %s", err)
Expand Down
2 changes: 2 additions & 0 deletions pkg/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ func readConf(configFile string) (*Config, error) {

// checkConfigFile checks config files and returns one config file
func checkConfigFile(filePath string) (string, error) {
// Remove the quotes
filePath = strings.Trim(filePath, `"`)
// Define possible config file names
configFiles := []string{filepath.Join(workingDir, "config.yaml"), filepath.Join(workingDir, "config.yml"), filePath}

Expand Down

0 comments on commit 2c3f2f4

Please sign in to comment.