Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code #52

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Refactor code #52

merged 1 commit into from
Feb 9, 2022

Conversation

XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented Sep 7, 2021

@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.

if (key === 'format' && value !== 'gnu') {
vnuArgs = [...vnuArgs, `--format ${value}`];
vnuArgs.push('--format', value);
Copy link
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
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