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

Update yarn.py: set name_version even w/o version #39557

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ansible/modules/packaging/language/yarn.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,16 @@ def __init__(self, module, **kwargs):
self.production = kwargs['production']
self.ignore_scripts = kwargs['ignore_scripts']

# Specify a version of package if version arg passed in
self.name_version = None
self.name_version = self.name

if kwargs['executable']:
self.executable = kwargs['executable'].split(' ')
else:
self.executable = [module.get_bin_path('yarn', True)]

# Append a version of package if version arg passed in
if kwargs['version'] and self.name is not None:
self.name_version = self.name + '@' + str(self.version)
self.name_version += '@' + str(self.version)

def _exec(self, args, run_in_check_mode=False, check_rc=True):
if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):
Expand Down