mirror of https://github.com/embarklabs/embark.git
fix(@embark/pipeline): check if config arg of writeStats is falsy
When passing the name of a build pipeline that doesn't exist, e.g. `embark run|build --pipeline foo`, `writeStats` would cause an unhandled promise rejection because its config argument is falsy. Checking for that and returning early from `writeStats` allows the `"no webpack config has the name 'foo'"` error to be reported correctly.
This commit is contained in:
parent
e58c5528a6
commit
9d81fc5b1c
|
@ -61,7 +61,7 @@ class WebpackProcess extends ProcessWrapper {
|
|||
}
|
||||
|
||||
async writeStats(config, stats, callback){
|
||||
if (!config.stats || config.stats === 'none') {
|
||||
if (!config || !config.stats || config.stats === 'none') {
|
||||
return callback();
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue