From a7144fe4715732a803638582ec2bb99394bb4348 Mon Sep 17 00:00:00 2001 From: vavuthu Date: Thu, 27 Jul 2023 11:09:16 +0530 Subject: [PATCH] use absolute path for bin directory Signed-off-by: vavuthu --- ocs_ci/utility/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ocs_ci/utility/utils.py b/ocs_ci/utility/utils.py index 979ef4725cb..70e9b41cdf4 100644 --- a/ocs_ci/utility/utils.py +++ b/ocs_ci/utility/utils.py @@ -752,7 +752,8 @@ def get_openshift_installer( """ version = version or config.DEPLOYMENT["installer_version"] - bin_dir = os.path.expanduser(bin_dir or config.RUN["bin_dir"]) + bin_dir_rel_path = os.path.expanduser(bin_dir or config.RUN["bin_dir"]) + bin_dir = os.path.abspath(bin_dir_rel_path) installer_filename = "openshift-install" installer_binary_path = os.path.join(bin_dir, installer_filename) client_binary_path = os.path.join(bin_dir, "oc") @@ -938,7 +939,8 @@ def get_openshift_client( """ version = version or config.RUN["client_version"] - bin_dir = os.path.expanduser(bin_dir or config.RUN["bin_dir"]) + bin_dir_rel_path = os.path.expanduser(bin_dir or config.RUN["bin_dir"]) + bin_dir = os.path.abspath(bin_dir_rel_path) client_binary_path = os.path.join(bin_dir, "oc") kubectl_binary_path = os.path.join(bin_dir, "kubectl") download_client = True