From 52daae66437d0ec2c86ee009c10064d1c68c3d55 Mon Sep 17 00:00:00 2001 From: Petr Ankudinov Date: Fri, 9 Feb 2024 11:53:34 +0100 Subject: [PATCH] Fix: Invalid check for ansible in devcontainer (#3608) --- containers/dev/.devcontainer/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/dev/.devcontainer/entrypoint.sh b/containers/dev/.devcontainer/entrypoint.sh index c8df7d33f72..4771f1fefbe 100644 --- a/containers/dev/.devcontainer/entrypoint.sh +++ b/containers/dev/.devcontainer/entrypoint.sh @@ -6,7 +6,7 @@ CONTAINER_WORKSPACE=$(git rev-parse --show-toplevel) CONTAINER_WSF_AVD_PATH=${CONTAINER_WORKSPACE}/ansible_collections/arista/avd # only install collections if ansible binary is missing -if ! [ -z "$(command -v ansible)" ]; then +if [ -z "$(command -v ansible)" ]; then # if collection is already mounted, it will be used to install the requirements # there is no need to install AVD collection for this case as it's already mounted to the correct location @@ -37,7 +37,7 @@ if ! [ -z "$(command -v ansible)" ]; then fi # if ansible installation failed for whatever reason - raise an error - if ! [ -z "$(command -v ansible)" ]; then + if [ -z "$(command -v ansible)" ]; then echo "ERROR: Failed to install Ansible and collections." >&2 exit 1 fi