mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4904 from joemaller/npm-outdated-fix
update npm-module to handle new node.js output
This commit is contained in:
commit
56e3d31253
1 changed files with 3 additions and 1 deletions
|
@ -163,7 +163,9 @@ class Npm(object):
|
||||||
data = self._exec(['outdated'], True, False)
|
data = self._exec(['outdated'], True, False)
|
||||||
for dep in data.splitlines():
|
for dep in data.splitlines():
|
||||||
if dep:
|
if dep:
|
||||||
pkg, other = dep.split('@', 1)
|
# node.js v0.10.22 changed the `npm outdated` module separator
|
||||||
|
# from "@" to " ". Split on both for backwards compatibility.
|
||||||
|
pkg, other = re.split('\s|@', dep, 1)
|
||||||
outdated.append(pkg)
|
outdated.append(pkg)
|
||||||
|
|
||||||
return outdated
|
return outdated
|
||||||
|
|
Loading…
Reference in a new issue