Skip to content

Commit 7122f64

Browse files
committed
Clarify reason for process exit
1 parent 3548b3d commit 7122f64

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
*.log

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
var postcss = require('postcss');
4+
var chalk = require('chalk');
45
var processResult = require('./lib/processResult');
56

67
var exitCode = 0;
@@ -19,5 +20,8 @@ module.exports = postcss.plugin('postcss-log-warnings', function(opts) {
1920
});
2021

2122
process.on('exit', function() {
22-
if (exitCode) process.exit(exitCode);
23+
if (!exitCode) return;
24+
25+
console.log(chalk.red.bold('\n** PostCSS warnings were logged **'));
26+
process.exit(exitCode);
2327
});

0 commit comments

Comments
 (0)