firebase / firebase/firebase-tools
When functions:delete command fails it prints to stdout instead of stderr
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:** 9.6.1
**Platform:** Ubuntu
### [REQUIRED] Test case
In node repl, attempt deleting a function group that doesn’t exist, using `require('child_process').exec`:
```
> require('child_process').exec('firebase functions:delete nonExistingFunctionGroupFooBarBaz -f', function(err, stdout, stderr) { console.log(arguments) })
[Arguments] {
'0': Error: Command failed: firebase functions:delete asdasds -f
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:529:15)
at maybeClose (internal/child_process.js:1048:16)
at Socket. (internal/child_process.js:439:11)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:529:15)
at Pipe. (net.js:673:12)
at Pipe.callbackTrampoline (internal/async_hooks.js:131:14) {
killed: false,
code: 1,
signal: null,
cmd: 'firebase functions:delete asdasds -f'
},
'1': '\n' +
'\x1B[1m\x1B[31mError:\x1B[39m\x1B[22m The specified filters do not match any existing functions in project \x1B[1mhierfoods-develop\x1B[22m.\n',
'2': ''
}
```
### [REQUIRED] Steps to reproduce
- Install firebase-tools globally
- Change into directory that has firebase project initialised in it
- Enter `node` repl
- type `require('child_process').exec('firebase functions:delete nonExistingFunctionGroupFooBarBaz -f', function(err, stdout, stderr) { console.log(arguments) })`
- only second argument, `stdout` will be populated
### [REQUIRED] Expected behavior
- `stderr` should be populated for errors
### [REQUIRED] Actual behavior
- `stdout` is populated with error message
Contributor guide
Assessment
This issue has not been assessed yet.