fix: native module to check command existence

The older version stopped working unexpectedly, if the command failed,
it failed the state.
This commit is contained in:
Ben Grande 2025-08-04 08:13:23 +02:00
parent 93ebe4c77f
commit 4737241ec4
No known key found for this signature in database
GPG key ID: 00C64E14F51F9E56

View file

@ -1,5 +1,5 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
@ -81,7 +81,7 @@ If sls_path is 'browser', then this would install the repo from:
{% endif -%}
{% if salt['cmd.retcode']('command -v apt-cacher-ng-repo >/dev/null') == 0 -%}
{% if salt['cmd.has_exec']('apt-cacher-ng-repo') -%}
"{{ name }}-run-apt-cacher-ng-repo":
cmd.run:
- name: apt-cacher-ng-repo