Closed WilliamMcCumstie closed 5 years ago
This maybe a click
issue:
(venv) [root@master(unconfigured) adminware]# bin/run-cli run tool top -n slave1 '--missing'
Error: no such option: --missing
(venv) [root@master(unconfigured) adminware]# bin/run-cli run --here tool top -n slave1 '--missing'
Error: no such option: --here
If this is indeed a click
issue, then some mechanism to escape the string is required
After adding some basic escaping to the argument input, strings starting with a hyphen may now be passed as arguments. There appears still be an issue in the option passing:
(venv) # bin/run-cli run tool top -n slave1 '\d1'
top - 21:51:39 up 3 days, 6:21, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 95 total, 2 running, 93 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 3.1 sy, 0.0 ni, 96.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 1882632 total, 1598744 free, 102068 used, 181820 buff/cache
KiB Swap: 1257468 total, 1257468 free, 0 used. 1581760 avail Mem
.... BLAH ....
(venv) [root@master(unconfigured) adminware]# bin/run-cli run tool top -n slave1 '\-d1'
Internal Print: Stripped Arg String: "-d1"
top: unknown option ' '
Usage:
top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols]
(venv) [root@master(unconfigured) adminware]# bin/run-cli run tool top -n slave1 '\\-d1'
Internal Print: Stripped Arg String: "\-d1"
top: unknown option '\'
Usage:
top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols]
This new issue needs to be resolved before the next release
More click
weirdness:
(venv) # bin/run-cli run tool top -n slave1 -
top: inappropriate '-'
Usage:
top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols]
(venv) # bin/run-cli run tool top -n slave1 \-
top: inappropriate '-'
Usage:
top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols]
I think this might be the result of the shell escaping?
(venv) [root@master(unconfigured) adminware]# bin/run-cli run tool top -n slave1 d0.1
top: bad delay interval ' 0 . 1'
When I try and run my top command, it doesn't seem to work if it start with
-
? Thecli
structure has changed on my branch a bit, but the issue should be unrelated.Can we work out why
run tool top -d
doesn't work?