From 065398d5de1019af1117454268813c14c36a8b74 Mon Sep 17 00:00:00 2001 From: Nadav Elyahu <88962733+nelyahu@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:54:53 +0200 Subject: [PATCH] Fix setup.py bash cmd generation to correctly extract git info (#6762) Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com> --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e39d8c7e05a3..c0452f867b31 100755 --- a/setup.py +++ b/setup.py @@ -202,8 +202,8 @@ def op_enabled(op_name): print(f'Install Ops={install_ops}') # Write out version/git info. -git_hash_cmd = shlex.split("bash -c git rev-parse --short HEAD") -git_branch_cmd = shlex.split("bash -c git rev-parse --abbrev-ref HEAD") +git_hash_cmd = shlex.split("bash -c \"git rev-parse --short HEAD\"") +git_branch_cmd = shlex.split("bash -c \"git rev-parse --abbrev-ref HEAD\"") if command_exists('git') and not is_env_set('DS_BUILD_STRING'): try: result = subprocess.check_output(git_hash_cmd)