reanahub / reana-client

REANA command-line client
http://reana-client.readthedocs.io/
MIT License
10 stars 45 forks source link

cli: `mv` command displaying all the workspace files #630

Closed BrunoRosendo closed 1 year ago

BrunoRosendo commented 1 year ago

Currently, when the user inputs a non-existing file as the target, the mv command displays all the workspace files of the given workflow. This is a problem in a realistic workspace, since this list will be very big. For example:

$ reana-client mv -w root6-roofit.4 bad bad
==> ERROR: Source file(s) bad/* does not exist in workspace ['code/gendata.C', 'code/fitdata.C', 'results/plot.png', 'results/data.root']
$ reana-client mv bad bad -w h4l 2>&1 | wc -c
57767

As you can see, the latter is huge and too big to include in this issue. Instead, we should follow the way reana-client-go handled this and just print the workflow name, like this:

$ reana-client mv -w my-roofit-analysis bad bad
==> ERROR: source file(s) bad does not exist in my-roofit-analysis workspace