Open tomster opened 10 years ago
Try aws -c etc/foo.conf ssh bar
sure, that works, of course. but that's not really convenient to use for rsync and/or sftp.
the whole point of assh is convenience in the first place :)
i looked into the implementation but couldn't find a ready means of fixing this, short of using argparse in assh itself, which i'd consider a hack...
i've debugged this a bit more and it seems the bug is bigger than initially expected...
in fact the whole -c | --config
feature seems to be broken, the values passed into the AWS.__init__
always take precedence, the value from the command line arguments is never taken into account!
it seems that this is triggered by AWS.config
being a lazy property that only consults the value of self.configfile
which at this point has already been initialized with the values passed into __init__
before parsing of the args has happened.
try renaming any aws.conf
you have in any project you're using mr.awsome
in and I dare you to get it working with -c
:-)
My proposed solution works for rsync, because it allows setting a whole command for ssh. For things like scp you have to specify a script and can't use any options, so fixing the option somehow wouldn't work anyway. You can only get scp working by creating a script which uses ploy ... ssh
with the correct options.
when calling assh with -c to specify a non-default config file from the command line it seems to get passed through to ssh because the message reads: