Skip to content

Commit 916a807

Browse files
committed
feat(utils): use execa properly
1 parent f02d2b0 commit 916a807

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import * as execa from 'execa'
1+
import { execa } from 'execa'
22
import type { ModuleOptions } from './module'
33

44
export async function getEdgeDbCredentials(
55
cwd: string,
66
processInject: boolean = true,
77
) {
8-
// http://localhost:10702/db/edgedb/ext/auth/
98
let dbCredentials: any | undefined
9+
1010
try {
11-
dbCredentials = await execa.execaCommand(`edgedb instance credentials --json`, { cwd })
11+
dbCredentials = await execa({ cwd })`edgedb instance credentials --json`
1212
}
1313
catch (e) {
1414
// Silently fail, the EdgeDB instance credentials command failed.
1515
}
16+
1617
if (dbCredentials) {
1718
const { host, port, database, user, password, tls_ca, tls_security } = JSON.parse(dbCredentials.stdout)
1819

0 commit comments

Comments
 (0)