Skip to content

Commit

Permalink
apt: fix mark when no packages (ansible#37835)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrizek authored Mar 23, 2018
1 parent 270e799 commit 687f3bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ansible/modules/packaging/os/apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ def parse_diff(output):


def mark_installed_manually(m, packages):
if not packages:
return

apt_mark_cmd_path = m.get_bin_path("apt-mark", required=True)
cmd = "%s manual %s" % (apt_mark_cmd_path, ' '.join(packages))
rc, out, err = m.run_command(cmd)
Expand Down

0 comments on commit 687f3bb

Please sign in to comment.