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

Allow empty targets #173

Merged
merged 2 commits into from
Dec 5, 2019
Merged

Conversation

mrmlnc
Copy link
Contributor

@mrmlnc mrmlnc commented Nov 27, 2019

Hello, @tclindner,

First, thanks you for this project 🎉

Description of change

I have a process in which I want to check only added packages (packages that did not exist before). I trying to do it with the following commands:

"scripts": {
   "get-added-packages": "git diff origin/master...HEAD --name-only --diff-filter A packages | grep -i \".*package.json$\"",
    "check-new-packages-deps": "npmPkgJsonLint $(npm run --silent get-added-packages)"
}

In this case I cannot guarantee that the output from the get-added-packages command will contain at least one file.

So, this PR adds the ability to not throw an error if no target is specified at startup.

Checklist

  • Unit tests have been added
  • Specific notes for documentation, if applicable

@mrmlnc mrmlnc requested a review from tclindner as a code owner November 27, 2019 15:42
@tclindner tclindner added the enhancement 👑 New feature or request label Dec 5, 2019
@tclindner
Copy link
Owner

Neat 👍 Cool use case, @mrmlnc!

P.S. Sorry for the delay. I was traveling ✈️

@tclindner tclindner merged commit cc1926a into tclindner:master Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 👑 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants