Skip to content

Commit

Permalink
Fix command line error display
Browse files Browse the repository at this point in the history
  • Loading branch information
phensley committed Jan 9, 2024
1 parent df16b9f commit 84d4ad6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/less-ts-cli/src/lessc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const run = (y: yargs.Arguments): void => {
const result = compiler.compile(source);
console.log(result.css);
for (const err of result.errors) {
console.log(`Error ${err}`);
const msg = err.errors.map((e) => e.message).join(', ');
console.error(`Error ${msg}`);
}
}
} catch (e) {
Expand All @@ -58,7 +59,7 @@ export const main = () => {
describe: 'path to source stylesheet',
type: 'string',
}),
run
run,
)
.option('p', {
alias: 'parse',
Expand Down

0 comments on commit 84d4ad6

Please sign in to comment.