diff --git a/pidd/__init__.py b/pidd/__init__.py index 9df594e..db868ff 100644 --- a/pidd/__init__.py +++ b/pidd/__init__.py @@ -115,12 +115,12 @@ def install_commands(path: str) -> None: (user / f"{COMMANDS_PREFIX}{command}").symlink_to(path) -def main() -> None: +def main(main: str) -> None: path, *arguments = sys.argv name = Path(path).name if name == "__main__.py": pidd.set_ssh(*arguments) - pidd.install_commands(__file__) + pidd.install_commands(main) else: function = getattr(pidd, name.replace("-", "_")) function(*arguments)