Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _shell_argv(cmd: str) -> list[str]:
"""Return a platform-appropriate shell argv for shell-meta commands."""
if os.name == "nt":
return ["cmd.exe", "/d", "/s", "/c", cmd]
return ["/bin/sh", "-lc", cmd]
return ["/bin/sh", "-c", cmd]


def resolve_command_argv(cmd: str) -> list[str]:
Expand Down
2 changes: 1 addition & 1 deletion desloppify/tests/lang/common/test_generic_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def test_resolve_command_argv_shell_meta_uses_platform_shell(self):
if os.name == "nt":
assert argv == ["cmd.exe", "/d", "/s", "/c", "echo ok | cat"]
else:
assert argv == ["/bin/sh", "-lc", "echo ok | cat"]
assert argv == ["/bin/sh", "-c", "echo ok | cat"]


def test_resolve_command_argv_windows_backslash_path_preserved(self):
Expand Down