Skip to content

Commit c6fb60f

Browse files
committed
chore: debug
1 parent adfe3dd commit c6fb60f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

api/scripts/dump.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function main () {
4242
body: `Démarrée le ${start.format('LL')} à ${start.format('LT')}.`
4343
})
4444
await eventsQueue.stop()
45-
console.log('dump finished')
45+
debug('dump script finished')
4646
} catch (err: any) {
4747
debug('send failure event')
4848
eventsQueue.pushEvent({

api/src/utils/exec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const debug = debugModule('exec')
66
export function exec (cmd: string, opts: SpawnOptions = {}) {
77
debug('exec command', cmd, opts)
88
return new Promise<void>((resolve, reject) => {
9-
const childProcess = spawn(cmd, { shell: true, stdio: 'inherit', ...opts })
9+
// ignore stdin and stdout, inherit stderr
10+
const childProcess = spawn(cmd, { shell: true, stdio: ['ignore', 'ignore', 'inherit'], ...opts })
1011
childProcess.on('error', reject)
1112
childProcess.on('close', (code, signal) => {
1213
if (signal !== null) return reject(new Error('process interrupted by signal ' + signal))

0 commit comments

Comments
 (0)