From 5fdfd1637b12ca888cf09743d85a003c87475a7a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 1 Jun 2024 20:14:06 +0200 Subject: [PATCH] arg0 --- cd/__init__.py | 4 ++-- cd/__main__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cd/__init__.py b/cd/__init__.py index b2cc47a..28b8c3b 100644 --- a/cd/__init__.py +++ b/cd/__init__.py @@ -86,8 +86,8 @@ def install_commands(path): os.symlink(path, os.path.join(user, f'{COMMANDS_PREFIX}{command}')) -def set_ssh(): - ssh_hosts = projects.environment.get('CD_SSH_HOSTS', None) +def set_ssh(*arguments): + ssh_hosts = arguments[0] ssh_key = projects.environment.get('CD', None) ssh_type = projects.environment.get('CD_SSH_TYPE', 'ed25519') # diff --git a/cd/__main__.py b/cd/__main__.py index ba1ca17..d67667f 100755 --- a/cd/__main__.py +++ b/cd/__main__.py @@ -10,7 +10,7 @@ if __name__ == '__main__': command, *arguments = sys.argv command = os.path.basename(command) if command == '__main__.py': - cd.set_ssh() + cd.set_ssh(*arguments) cd.install_commands(__file__) else: command = command.replace('-', '_')