MCPcopy Create free account
hub / github.com/porsager/postgres / exec

Function exec

tests/bootstrap.js:21–25  ·  view source on GitHub ↗
(cmd, args)

Source from the content-addressed store, hash-verified

19exec('psql', ['-c', 'alter database postgres_js_test owner to postgres_js_test'])
20
21export function exec(cmd, args) {
22 const { stderr } = spawnSync(cmd, args, { stdio: 'pipe', encoding: 'utf8' })
23 if (stderr && !stderr.includes('already exists') && !stderr.includes('does not exist') && !stderr.includes('WARNING:'))
24 throw stderr
25}
26
27async function execAsync(cmd, args) { // eslint-disable-line
28 let stderr = ''

Callers 2

index.jsFile · 0.90
bootstrap.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected