Skip to content

Commit 8ab699b

Browse files
authored
fix: Omit --detach option for run subcommand on Windows (#4185)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
1 parent 35a3553 commit 8ab699b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

micromamba/tests/test_run.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
from .helpers import create, random_string, subprocess_run, umamba_run
1111

1212
common_simple_flags = ["", "-d", "--detach", "--clean-env"]
13+
# -d/--detach are not available on Windows (see run.cpp)
14+
common_simple_flags_for_help = (
15+
[f for f in common_simple_flags if f not in ("-d", "--detach")]
16+
if platform == "win32"
17+
else common_simple_flags
18+
)
1319
possible_characters_for_process_names = (
1420
"-_" + string.ascii_uppercase + string.digits + string.ascii_lowercase
1521
)
@@ -53,7 +59,7 @@ def test_unknown_exe_fails(self, option_flag, make_label_flags):
5359
else:
5460
assert fails is True
5561

56-
@pytest.mark.parametrize("option_flag", common_simple_flags)
62+
@pytest.mark.parametrize("option_flag", common_simple_flags_for_help)
5763
# @pytest.mark.parametrize("label_flags", naming_flags()) # TODO: reactivate after fixing help flag not disactivating the run
5864
@pytest.mark.parametrize("help_flag", ["-h", "--help"])
5965
@pytest.mark.parametrize("command", ["", simple_short_program()])

0 commit comments

Comments
 (0)