-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Updating yarn.list to not fail when when warnings are emitted #6129
Updating yarn.list to not fail when when warnings are emitted #6129
Conversation
plugins/modules/yarn.py
Outdated
for line in error.splitlines(): | ||
if json.loads(line)['type'] == 'error': | ||
self.module.fail_json(msg=error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the same approach that yarn.list_outdated()
is using, to filter out warnings and only fail on errors:
community.general/plugins/modules/yarn.py
Lines 285 to 288 in c0cb795
# the package.json in the global dir is missing a license field, so warnings are expected on stderr | |
for line in err.splitlines(): | |
if json.loads(line)['type'] == 'error': | |
self.module.fail_json(msg=err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
87fd6b6
to
5411c7a
Compare
- Fixing formatting
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Felix Fontein <felix@fontein.de>
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. If nobody objects, I'll merge this in a week.
Backport to stable-5: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply df34569 on top of patchback/backports/stable-5/df34569fadca7f3b554f612d7480b1eb50919704/pr-6129 Backporting merged PR #6129 into main
🤖 @patchback |
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #6189 🤖 @patchback |
* Updating yarn.list to not fail when when warnings are emitted * Adding changelog fragment * Adding _process_yarn_error function * - Adding back changes to the changelog fragment - Fixing formatting * Fix trailing whitespace * Update plugins/modules/yarn.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit df34569)
@JohnDaly thank you very much for your contribution! |
… when when warnings are emitted (#6189) Updating yarn.list to not fail when when warnings are emitted (#6129) * Updating yarn.list to not fail when when warnings are emitted * Adding changelog fragment * Adding _process_yarn_error function * - Adding back changes to the changelog fragment - Fixing formatting * Fix trailing whitespace * Update plugins/modules/yarn.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit df34569) Co-authored-by: John Daly <john.daly2@gmail.com>
SUMMARY
Fixes #6127
ISSUE TYPE
COMPONENT NAME
yarn
ADDITIONAL INFORMATION
See #6127 for details