From 653a98fa730cecd4584da5edce89b25d03b35416 Mon Sep 17 00:00:00 2001 From: Fabrice Normandin Date: Mon, 18 Dec 2023 14:24:16 -0500 Subject: [PATCH] Tweak ssh-keygen call and test timeout Signed-off-by: Fabrice Normandin --- milatools/cli/init_command.py | 3 ++- tests/cli/test_init_command.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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