parent
914ecb28cf
commit
5fdfd1637b
2 changed files with 3 additions and 3 deletions
|
@ -86,8 +86,8 @@ def install_commands(path):
|
||||||
os.symlink(path, os.path.join(user, f'{COMMANDS_PREFIX}{command}'))
|
os.symlink(path, os.path.join(user, f'{COMMANDS_PREFIX}{command}'))
|
||||||
|
|
||||||
|
|
||||||
def set_ssh():
|
def set_ssh(*arguments):
|
||||||
ssh_hosts = projects.environment.get('CD_SSH_HOSTS', None)
|
ssh_hosts = arguments[0]
|
||||||
ssh_key = projects.environment.get('CD', None)
|
ssh_key = projects.environment.get('CD', None)
|
||||||
ssh_type = projects.environment.get('CD_SSH_TYPE', 'ed25519')
|
ssh_type = projects.environment.get('CD_SSH_TYPE', 'ed25519')
|
||||||
#
|
#
|
||||||
|
|
|
@ -10,7 +10,7 @@ if __name__ == '__main__':
|
||||||
command, *arguments = sys.argv
|
command, *arguments = sys.argv
|
||||||
command = os.path.basename(command)
|
command = os.path.basename(command)
|
||||||
if command == '__main__.py':
|
if command == '__main__.py':
|
||||||
cd.set_ssh()
|
cd.set_ssh(*arguments)
|
||||||
cd.install_commands(__file__)
|
cd.install_commands(__file__)
|
||||||
else:
|
else:
|
||||||
command = command.replace('-', '_')
|
command = command.replace('-', '_')
|
||||||
|
|
Loading…
Reference in a new issue