Skip to content

Commit

Permalink
Change the default check=False in conan.tools.system.package_manager.…
Browse files Browse the repository at this point in the history
…Apt to True (#14728)

* check if we can change default

* fix arguments
  • Loading branch information
czoido authored Sep 14, 2023
1 parent 98b5c6a commit 3430ad5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conan/tools/system/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def __init__(self, conanfile, arch_names=None):

self._arch_separator = ":"

def install(self, packages, update=False, check=False, recommends=False):
def install(self, packages, update=False, check=True, recommends=False):
"""
Will try to install the list of packages passed as a parameter. Its
behaviour is affected by the value of ``tools.system.package_manager:mode``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_apt_install_recommends(recommends, recommends_str):
with mock.patch('conan.ConanFile.context', new_callable=PropertyMock) as context_mock:
context_mock.return_value = "host"
apt = Apt(conanfile)
apt.install(["package1", "package2"], recommends=recommends)
apt.install(["package1", "package2"], recommends=recommends, check=False)
assert apt._conanfile.command == "apt-get install -y {}package1 package2".format(recommends_str)


Expand Down

0 comments on commit 3430ad5

Please sign in to comment.