4363: Merge branch 'master' into 4363-less-filename-munging
[arvados.git] / sdk / cli / bin / arv
index 8c7e6f179d4a4aba16989ee86070180c9dab1a78..533ea39eb7b27c2d96f391e1bc47c2cb8d599fc9 100755 (executable)
@@ -113,7 +113,8 @@ def init_config
   end
 end
 
-subcommands = %w(create edit keep pipeline tag ws)
+
+subcommands = %w(copy create edit keep pipeline run tag ws)
 
 def check_subcommands client, arvados, subcommand, global_opts, remaining_opts
   case subcommand
@@ -121,9 +122,11 @@ def check_subcommands client, arvados, subcommand, global_opts, remaining_opts
     arv_create client, arvados, global_opts, remaining_opts
   when 'edit'
     arv_edit client, arvados, global_opts, remaining_opts
+  when 'copy', 'tag', 'ws', 'run'
+    exec `which arv-#{subcommand}`.strip, *remaining_opts
   when 'keep'
     @sub = remaining_opts.shift
-    if ['get', 'put', 'ls', 'normalize', 'copy'].index @sub then
+    if ['get', 'put', 'ls', 'normalize'].index @sub then
       # Native Arvados
       exec `which arv-#{@sub}`.strip, *remaining_opts
     elsif ['less', 'check'].index @sub then
@@ -147,10 +150,6 @@ def check_subcommands client, arvados, subcommand, global_opts, remaining_opts
       puts "Available methods: run"
     end
     abort
-  when 'tag'
-    exec `which arv-tag`.strip, *remaining_opts
-  when 'ws'
-    exec `which arv-ws`.strip, *remaining_opts
   end
 end