diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e143005ff..a3c7d67d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: env: GO_VERSION: 1.15 + USE_LIBSODIUM: 1 jobs: release-ubuntu: diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 38a715168..6370876c0 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -1,6 +1,7 @@ name: Unit tests on: + workflow_dispatch: push: branches: [ master ] pull_request: diff --git a/internal/configure_crypter.go b/internal/configure_crypter.go index 62b9fefee..e25814d08 100644 --- a/internal/configure_crypter.go +++ b/internal/configure_crypter.go @@ -14,9 +14,19 @@ package internal // If there is a tag, we can configure the correct implementation of crypter. import ( + "github.com/spf13/viper" + "github.com/wal-g/tracelog" "github.com/wal-g/wal-g/internal/crypto" ) func configureLibsodiumCrypter() crypto.Crypter { + if viper.IsSet(LibsodiumKeySetting) { + tracelog.ErrorLogger.Fatalf("non-empty WALG_LIBSODIUM_KEY but wal-g was not compiled with libsodium") + } + + if viper.IsSet(LibsodiumKeyPathSetting) { + tracelog.ErrorLogger.Fatalf("non-empty WALG_LIBSODIUM_KEY_PATH but wal-g was not compiled with libsodium") + } + return nil }