6657: copy_pipeline_template method also updated to check git existence.
[arvados.git] / sdk / python / arvados / commands / arv_copy.py
index e7eb5a9e2802ae8cede8ec2987f75cbcc8fba933..62bf047a8d750e1135e1061702d79d3b0ec31b53 100755 (executable)
@@ -271,6 +271,12 @@ def copy_pipeline_template(pt_uuid, src, dst, args):
     pt = src.pipeline_templates().get(uuid=pt_uuid).execute(num_retries=args.retries)
 
     if args.recursive:
+        # Check if git is available
+        try:
+            arvados.util.run_command(['git', '--help'])
+        except:
+            abort('git command is not available. Please ensure git is installed.')
+
         if not args.dst_git_repo:
             abort('--dst-git-repo is required when copying a pipeline recursively.')
         # Copy input collections, docker images and git repos.