From 868c596dcd60a423c8a4be38825e9f79ec1cb5f6 Mon Sep 17 00:00:00 2001 From: wener Date: Mon, 4 Nov 2024 17:15:40 +0800 Subject: [PATCH] fix: detect pg_ctl exists instead of bin dir --- embedded_postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded_postgres.go b/embedded_postgres.go index fcf98d1..d134926 100644 --- a/embedded_postgres.go +++ b/embedded_postgres.go @@ -147,7 +147,7 @@ func (ep *EmbeddedPostgres) downloadAndExtractBinary(cacheExists bool, cacheLoca mu.Lock() defer mu.Unlock() - _, binDirErr := os.Stat(filepath.Join(ep.config.binariesPath, "bin")) + _, binDirErr := os.Stat(filepath.Join(ep.config.binariesPath, "bin", "pg_ctl")) if os.IsNotExist(binDirErr) { if !cacheExists { if err := ep.remoteFetchStrategy(); err != nil {