summarylogtreecommitdiffstats
path: root/postgres-path.patch
blob: 07c0d671e8b45f050fafda0354dd2df228783140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/server/src/services/database-backup.service.ts
+++ b/server/src/services/database-backup.service.ts
@@ -205,7 +205,7 @@
     }
 
     return {
-      bin: `/usr/lib/postgresql/${databaseMajorVersion}/bin/${bin}`,
+      bin: `/usr/bin/${bin}`,
       args,
       databaseUsername,
       databasePassword: isUrlConnection ? new URL(databaseConfig.url).password : databaseConfig.password,
--- a/server/src/services/database-backup.service.spec.ts
+++ b/server/src/services/database-backup.service.spec.ts
@@ -277,7 +277,7 @@
         mocks.database.getPostgresVersion.mockResolvedValue(postgresVersion);
         await sut.handleBackupDatabase();
         expect(mocks.process.spawnDuplexStream).toHaveBeenCalledWith(
-          `/usr/lib/postgresql/${expectedVersion}/bin/pg_dump`,
+          `/usr/bin/pg_dump`,
           expect.any(Array),
           expect.any(Object),
         );