mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
color emulator errors
This commit is contained in:
parent
8fc34f6751
commit
699b9bcfef
@ -5,6 +5,7 @@ const chalk = require('chalk');
|
||||
|
||||
const colorPrefix = chalk.hex('#bdb018');
|
||||
const colorDim = chalk.hex('#777777');
|
||||
const colorError = chalk.hex('#e22836');
|
||||
const spaceSmall = ' ';
|
||||
const prefix = colorPrefix(` Serverless${spaceSmall}`);
|
||||
|
||||
@ -16,7 +17,9 @@ const processMessage = rawMessage => {
|
||||
msg = msg.trim();
|
||||
|
||||
if (msg.startsWith('Error:')) {
|
||||
msg = `Function failed due to an error:${os.EOL}${os.EOL}${colorDim(msg)}${os.EOL}`;
|
||||
msg = `${colorError('Function failed due to an error:')}${os.EOL}${os.EOL}${colorDim(
|
||||
msg
|
||||
)}${os.EOL}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user