projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
6657: check git availability only when recursive copy is being used.
[arvados.git]
/
sdk
/
python
/
arvados
/
commands
/
arv_copy.py
diff --git
a/sdk/python/arvados/commands/arv_copy.py
b/sdk/python/arvados/commands/arv_copy.py
index 1d10b042729f1712a896a4d1d17c1a01d1cef29c..e7eb5a9e2802ae8cede8ec2987f75cbcc8fba933 100755
(executable)
--- a/
sdk/python/arvados/commands/arv_copy.py
+++ b/
sdk/python/arvados/commands/arv_copy.py
@@
-212,6
+212,12
@@
def copy_pipeline_instance(pi_uuid, src, dst, args):
pi = src.pipeline_instances().get(uuid=pi_uuid).execute(num_retries=args.retries)
if args.recursive:
pi = src.pipeline_instances().get(uuid=pi_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 the pipeline template and save the copied template.
if not args.dst_git_repo:
abort('--dst-git-repo is required when copying a pipeline recursively.')
# Copy the pipeline template and save the copied template.