diff --git a/milatools/cli/init_command.py b/milatools/cli/init_command.py index 150138b7..0cc802f3 100644 --- a/milatools/cli/init_command.py +++ b/milatools/cli/init_command.py @@ -3,6 +3,7 @@ import copy import difflib import json +import shlex import shutil import subprocess import sys @@ -243,7 +244,7 @@ def get_windows_home_path_in_wsl() -> Path: def create_ssh_keypair(ssh_private_key_path: Path, local: Local) -> None: - local.run("ssh-keygen", "-f", str(ssh_private_key_path), "-t", "rsa", "-N=''") + local.run(*shlex.split(f"ssh-keygen -f {ssh_private_key_path} -t rsa -N=''")) def setup_vscode_settings(): diff --git a/tests/cli/test_init_command.py b/tests/cli/test_init_command.py index 4d4273b9..08632eb7 100644 --- a/tests/cli/test_init_command.py +++ b/tests/cli/test_init_command.py @@ -53,7 +53,7 @@ def permission_bits_check_doesnt_work_on_windows(): # Set a module-level mark: Each test cannot take longer than 1 second to run. -pytestmark = pytest.mark.timeout(1) +pytestmark = pytest.mark.timeout(2) @pytest.fixture