From 2c3f2f4a466246095678f43a48e6bfcd019e6e84 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sun, 12 Jan 2025 07:58:32 +0100 Subject: [PATCH] fix: the configuration file path is not being detected when it is enclosed in quotes --- .github/workflows/build.yml | 6 +++--- pkg/backup.go | 2 +- pkg/helper.go | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 055bd38..3f627da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ name: Build on: push: - branches: ['develop'] + branches: ['nightly'] env: BUILDKIT_IMAGE: jkaninda/mysql-bkup jobs: @@ -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" diff --git a/pkg/backup.go b/pkg/backup.go index 5b0cdb0..3ff20a3 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -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) diff --git a/pkg/helper.go b/pkg/helper.go index 3f311e4..0fc86e4 100644 --- a/pkg/helper.go +++ b/pkg/helper.go @@ -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}