From 956f9dad78f171c85106b4e39921f7ea43b98a6b Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Thu, 5 Oct 2023 00:53:23 -0500 Subject: [PATCH] fix(mongodb): Fallback to `mongo` command if `mongosh` is not available --- internal/database/dialect/mongodb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/database/dialect/mongodb.go b/internal/database/dialect/mongodb.go index e86c4424..0091dafc 100644 --- a/internal/database/dialect/mongodb.go +++ b/internal/database/dialect/mongodb.go @@ -79,7 +79,7 @@ func (db MongoDB) AuthenticationDatabase(c config.Global) string { func (db MongoDB) ExecCommand(conf config.Exec) *command.Builder { cmd := command.NewBuilder( - "mongosh", + command.Raw(`"$(which mongosh || which mongo)"`), "--host="+conf.Host, "--username="+conf.Username, "--password="+conf.Password,