Skip to content

Commit

Permalink
stop printing extra new lines
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed Oct 19, 2021
1 parent b5a238f commit b501e8e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"name": "virmator",
"version": "1.3.4",
"version": "1.3.5",
"description": "Handle all the stuffs in one package.",
"keywords": [],
"keywords": [
"automation",
"template",
"vir",
"formatting",
"spellcheck",
"config"
],
"homepage": "https://github.com/electrovir/virmator",
"bugs": {
"url": "https://github.com/electrovir/virmator/issues"
Expand Down
8 changes: 6 additions & 2 deletions src/cli/commands/run-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ export async function runCommand(
cliFlags[CliFlagName.Silent] && command !== CliCommandName.Help
? EmptyOutputCallbacks
: {
stdoutCallback: console.info,
stderrCallback: console.error,
stdoutCallback: (input: string) => {
console.info(input.replace(/\n\n$/, '\n'));
},
stderrCallback: (input: string) => {
console.error(input.replace(/\n\n$/, '\n'));
},
};

const commandResult = await commandImplementation.implementation({
Expand Down

0 comments on commit b501e8e

Please sign in to comment.