Closed ailispaw closed 8 years ago
It works fine so far, but I'm not sure of its quote handling.
@ailispaw
Thanks. LGTM! However, if running wocker
commands in sub directories, this will create .ssh_config
everywhere. Do you have any ideas to avoid it?
@ailispaw Quotes handle variable issues, but I forgot the details.
However, if running wocker commands in sub directories, this will create .ssh_config everywhere. Do you have any ideas to avoid it?
Ah! I will try.
@ailispaw
And, if the VM is not running, for the first time to execute wocker
commands will create an empty .ssh_config
.
I see.
@ixkaito I think it works fine with the edge cases now, except quotes handling.
Need squash?
@ailispaw
Thanks! The .ssh_config
issue was solved well, but the here document seems not to handle arguments well. If there are two or more arguments (sub commands + one or more arguments), the sub commands will not be executed e.g. wocker ps -a
.
Need squash?
No, it's OK.
I see.
Line. 21 "$@"
-> $@
will work.
But i'm concerned about a parameter with quotes/spaces.
Hmm.
But it seems that most cases are fine, because a space is not allowed within a container name.
trap "rm -f '${SSH_CONFIG}'" ERR
remove .ssh_config on every error.
I would like to distinguish ssh errors from wocker command errors and even help command.
FYI: I made an another cli tool for a generic purpose. It's inspired by this. https://github.com/bargees/barge-cli
@ailispaw
Thank you for your great effort and support. Works well!
I reverted Vagrant commands as fallbacks, for I don't want to update these commands when I add/remove features of them. Also fixed the bug of network
and volume
in Wocker CLI.
My pleasure.
I reverted Vagrant commands as fallbacks, for I don't want to update these commands when I add/remove features of them.
I understand. :)
and, other commands just pass through and should be evaluated by wocker-cli at the VM side.
And also I found a bug at the case of 'network' and 'volume' subcommands in wocker-cli at the VM.
'network connect' | 'network create' | 'network disconnect' | 'network inspect' | 'network ls' | 'network rm'
should be'network'
and'volume create' | 'volume inspect' | 'volume ls' | 'volume rm'
should be'volume'
.