From 0cedaf1d1f5c2d07ddcf0b4149ff5febec85e8d2 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:18:26 +0200 Subject: [PATCH] Handle the case in which the path is not absolute. --- alibuild_helpers/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alibuild_helpers/git.py b/alibuild_helpers/git.py index af7672c0..6ed86db9 100644 --- a/alibuild_helpers/git.py +++ b/alibuild_helpers/git.py @@ -90,7 +90,7 @@ def git(args, directory=".", check=True, prompt=True): args=" ".join(map(quote, args)), # GIT_TERMINAL_PROMPT is only supported in git 2.3+. prompt_var="GIT_TERMINAL_PROMPT=0" if not prompt else "", - directory_safe_var="GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.directory GIT_CONFIG_VALUE_0={}".format(directory) if directory else "", + directory_safe_var="GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.directory GIT_CONFIG_VALUE_0=$PWD" if directory else "", ), timeout=GIT_COMMAND_TIMEOUT_SEC) if check and err != 0: raise SCMError("Error {} from git {}: {}".format(err, " ".join(args), output))