Skip to content

Refactor code - #52

Merged
XhmikosR merged 1 commit into
mainfrom
dev
Feb 9, 2022
Merged

Refactor code#52
XhmikosR merged 1 commit into
mainfrom
dev

Conversation

@XhmikosR

@XhmikosR XhmikosR commented Sep 7, 2021

Copy link
Copy Markdown
Member

@watilde could you have a quick look please?

Note that things should work now when there are spaces in the vnu-jar path too. I also removed vnuErrorLevels.colors because AFAICT they do nothing if you do not pass them to winston.

Comment thread index.js
const value = mergedOptions[key];
if (key === 'format' && value !== 'gnu') {
vnuArgs = [...vnuArgs, `--format ${value}`];
vnuArgs.push('--format', value);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this wrong before? It triggers a new unsafe shell command error. Any ideas how to fix this welcome.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a patch which limits the format values, let me know what you think

* use `Array.push` instead of spread
* quote paths so that they work with folders with spaces
@XhmikosR XhmikosR changed the title Dev patches Refactor code Feb 9, 2022
@XhmikosR
XhmikosR marked this pull request as ready for review February 9, 2022 15:02
@XhmikosR
XhmikosR merged commit a18839d into main Feb 9, 2022
@XhmikosR
XhmikosR deleted the dev branch February 9, 2022 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant