drydock-cli 3.0.107__tar.gz → 3.0.108__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {drydock_cli-3.0.107/drydock_cli.egg-info → drydock_cli-3.0.108}/PKG-INFO +1 -1
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tools/__init__.py +35 -6
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tuning.py +27 -1
- {drydock_cli-3.0.107 → drydock_cli-3.0.108/drydock_cli.egg-info}/PKG-INFO +1 -1
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock_cli.egg-info/SOURCES.txt +1 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/pyproject.toml +1 -1
- drydock_cli-3.0.108/tests/test_windows_shell.py +67 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/LICENSE +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/NOTICE +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/README.md +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/__init__.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/__main__.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/advisor.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/agent.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/bash_safety.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/builtin_skills/__init__.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/builtin_skills/rmf-categorize.md +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/builtin_skills/rmf-control.md +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/builtin_skills/rmf-poam.md +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/builtin_skills/rmf-review.md +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/builtin_skills/stig-assess.md +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/builtin_skills/stig-remediate.md +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/cci.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/cli.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/compaction.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/config.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/detect.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/extract.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/gittools.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/graphrag.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/guards.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/loop_detect.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/mcp.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/poam.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/providers.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/rmf.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/rmf_graph.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/skills.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/stig.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tool_registry.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tui/__init__.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tui/app.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tui/approval.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tui/messages.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/tui/widgets.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock/web.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock_cli.egg-info/dependency_links.txt +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock_cli.egg-info/entry_points.txt +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock_cli.egg-info/requires.txt +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/drydock_cli.egg-info/top_level.txt +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/setup.cfg +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_advisor.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_approval.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_back_command.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_background.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_binary_output.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_crossplatform.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_output_bounding.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_process_group.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_safety.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_sanitize.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_shell.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_stdin.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_stop_partial.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_timeout_network.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_bash_timeout_param.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_cci.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_cli_agents.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_compact_command.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_compaction.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_config.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_config_migration.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_context_limit_config.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_detect.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_dispatch.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_e2e_connected.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_edit_replace_all.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_empty_response.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_extract.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_failure_loop.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_first_run_setup.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_gittools.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_glob_edit_edges.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_graphify_example.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_graphrag.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_grep_and_read_robust.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_guards_and_tools.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_hallucinated_tools.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_leaked_tool_call.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_loop_detect.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_mcp.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_oneshot_unreachable.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_overthink_interrupt.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_plan_autocontinue.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_poam.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_providers_unreachable.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_read_index.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_rmf.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_rmf_graph.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_rmf_stig_graph.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_runaway_repetition.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_server_probe.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_skills.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_stall_retry.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_stig.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_stop.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_streaming_newlines.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_subagent.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_system_prompt_help.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_todo.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_tool_arg_coercion.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_tool_arg_coercion_more.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_tool_arg_parsing.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_tools_undo.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_tui.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_tuning.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_viewimage.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_vision_input.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_web_tools.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_write_content_coerce.py +0 -0
- {drydock_cli-3.0.107 → drydock_cli-3.0.108}/tests/test_xccdf.py +0 -0
|
@@ -93,9 +93,32 @@ def _detect_bash() -> str | None:
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
_IS_WINDOWS = os.name == "nt"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def _detect_shell() -> tuple[str, str]:
|
|
99
|
+
"""Pick the shell tool_bash runs commands in — returns (kind, path).
|
|
100
|
+
|
|
101
|
+
POSIX → bash (so the model's bash-isms work), else /bin/sh.
|
|
102
|
+
Windows → PowerShell (what users actually launch drydock in — pwsh, else
|
|
103
|
+
Windows PowerShell), else cmd.exe. WSL / Git-Bash is NOT required on Windows;
|
|
104
|
+
if you'd rather use them, install bash and it's picked up on POSIX-like paths.
|
|
105
|
+
"""
|
|
106
|
+
import shutil
|
|
107
|
+
if _IS_WINDOWS:
|
|
108
|
+
for name in ("pwsh", "powershell"):
|
|
109
|
+
p = shutil.which(name)
|
|
110
|
+
if p:
|
|
111
|
+
return ("powershell", p)
|
|
112
|
+
return ("cmd", shutil.which("cmd") or "cmd.exe")
|
|
113
|
+
b = _detect_bash()
|
|
114
|
+
if b:
|
|
115
|
+
return ("bash", b)
|
|
116
|
+
return ("sh", shutil.which("sh") or "/bin/sh")
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# Resolved once at import (in whatever environment drydock runs — Linux/macOS,
|
|
120
|
+
# the task container, or native Windows). _BASH_SHELL kept for back-compat.
|
|
121
|
+
_SHELL_KIND, _SHELL_PATH = _detect_shell()
|
|
99
122
|
_BASH_SHELL = _detect_bash()
|
|
100
123
|
|
|
101
124
|
|
|
@@ -1040,9 +1063,15 @@ def tool_bash(params: dict, config: dict) -> str:
|
|
|
1040
1063
|
# would be called as `bash /c ...` and fail. `[bash, "-c", cmd]` runs the same
|
|
1041
1064
|
# on Linux and Windows. Without bash, fall back to the platform default shell
|
|
1042
1065
|
# (cmd.exe on Windows, /bin/sh on POSIX) via shell=True.
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1066
|
+
# Build the invocation for the detected shell. Explicit argv (shell=False)
|
|
1067
|
+
# for bash/PowerShell so it's correct on every OS; shell=True lets the
|
|
1068
|
+
# platform default (/bin/sh on POSIX, cmd.exe on Windows) handle the rest.
|
|
1069
|
+
if _SHELL_KIND == "bash":
|
|
1070
|
+
popen_cmd, use_shell = [_SHELL_PATH, "-c", cmd], False
|
|
1071
|
+
elif _SHELL_KIND == "powershell":
|
|
1072
|
+
popen_cmd, use_shell = [_SHELL_PATH, "-NoProfile", "-NonInteractive",
|
|
1073
|
+
"-Command", cmd], False
|
|
1074
|
+
else: # "sh" (POSIX) or "cmd" (Windows) → platform default shell
|
|
1046
1075
|
popen_cmd, use_shell = cmd, True
|
|
1047
1076
|
try:
|
|
1048
1077
|
proc = subprocess.Popen(
|
|
@@ -272,10 +272,36 @@ _DRYDOCK_COMMANDS_HELP = (
|
|
|
272
272
|
)
|
|
273
273
|
|
|
274
274
|
|
|
275
|
+
def _shell_env_note() -> str:
|
|
276
|
+
"""On Windows, tell the model its shell is PowerShell/cmd so it stops
|
|
277
|
+
emitting bash it can't run. Empty on POSIX (bash is the default assumption)."""
|
|
278
|
+
import os
|
|
279
|
+
import shutil
|
|
280
|
+
if os.name != "nt":
|
|
281
|
+
return ""
|
|
282
|
+
if shutil.which("pwsh") or shutil.which("powershell"):
|
|
283
|
+
return (
|
|
284
|
+
"\nENVIRONMENT: You are on WINDOWS and the Bash tool runs your commands "
|
|
285
|
+
"through POWERSHELL, not bash. Use PowerShell / Windows commands: "
|
|
286
|
+
"Get-ChildItem (ls), Get-Content (cat), Select-String (grep), Copy-Item, "
|
|
287
|
+
"Move-Item, Remove-Item, New-Item, Test-Path, Where-Object. Many Unix "
|
|
288
|
+
"aliases (ls, cat, cp, rm, pwd, echo) also work. Do NOT use bash-only "
|
|
289
|
+
"syntax ([[ ]], <<<, $(...) subshells, grep/sed/awk pipelines) — it "
|
|
290
|
+
"fails. Use Windows paths (backslashes) and $env:VAR for environment "
|
|
291
|
+
"variables. Chain commands with ';' (not '&&')."
|
|
292
|
+
)
|
|
293
|
+
return (
|
|
294
|
+
"\nENVIRONMENT: You are on WINDOWS and the Bash tool runs your commands "
|
|
295
|
+
"through cmd.exe, not bash. Use Windows/cmd commands (dir, type, findstr, "
|
|
296
|
+
"copy, del, move, mkdir); do NOT use bash syntax. Use backslash paths, "
|
|
297
|
+
"%VAR% for environment variables, and '&' or '&&' to chain commands."
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
|
|
275
301
|
def system_prompt_for_model(model: str | None) -> str:
|
|
276
302
|
"""Return the system prompt best suited to the model."""
|
|
277
303
|
base = _GEMMA_SYSTEM_PROMPT if is_gemma(model) else _DEFAULT_SYSTEM_PROMPT
|
|
278
|
-
return base + _DRYDOCK_COMMANDS_HELP
|
|
304
|
+
return base + _DRYDOCK_COMMANDS_HELP + _shell_env_note()
|
|
279
305
|
|
|
280
306
|
|
|
281
307
|
def thinking_level_for_turn(turn_count: int, is_user_turn: bool) -> str:
|
|
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
|
|
7
7
|
# PyPI distribution name is drydock-cli (the established install name, continued
|
|
8
8
|
# from the retired v2 fork); the import package + CLI command stay `drydock`.
|
|
9
9
|
name = "drydock-cli"
|
|
10
|
-
version = "3.0.
|
|
10
|
+
version = "3.0.108"
|
|
11
11
|
description = "Drydock — a local, provider-agnostic terminal coding agent for local LLMs"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.11"
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""drydock runs natively on Windows via PowerShell/cmd — no WSL/bash required.
|
|
2
|
+
tool_bash picks the shell (POSIX→bash, Windows→PowerShell else cmd) and builds
|
|
3
|
+
the right invocation; the system prompt tells the model which shell it's on."""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import subprocess
|
|
7
|
+
from unittest import mock
|
|
8
|
+
|
|
9
|
+
import drydock.tools as T
|
|
10
|
+
from drydock import tuning
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_posix_uses_bash():
|
|
14
|
+
assert T._SHELL_KIND in ("bash", "sh")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def test_windows_prefers_powershell():
|
|
18
|
+
with mock.patch.object(T, "_IS_WINDOWS", True), \
|
|
19
|
+
mock.patch("shutil.which", side_effect=lambda n: r"C:\ps\pwsh.exe" if n == "pwsh" else None):
|
|
20
|
+
kind, path = T._detect_shell()
|
|
21
|
+
assert kind == "powershell" and path.endswith("pwsh.exe")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def test_windows_falls_back_to_cmd():
|
|
25
|
+
with mock.patch.object(T, "_IS_WINDOWS", True), \
|
|
26
|
+
mock.patch("shutil.which", side_effect=lambda n: r"C:\Windows\System32\cmd.exe" if n == "cmd" else None):
|
|
27
|
+
kind, _ = T._detect_shell()
|
|
28
|
+
assert kind == "cmd"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_powershell_invocation_argv(monkeypatch):
|
|
32
|
+
"""When the shell is PowerShell, Popen is called [pwsh -NoProfile
|
|
33
|
+
-NonInteractive -Command <cmd>] with shell=False — not shell=True."""
|
|
34
|
+
seen = {}
|
|
35
|
+
real = subprocess.Popen
|
|
36
|
+
|
|
37
|
+
class FakeProc:
|
|
38
|
+
stdout = None
|
|
39
|
+
pid = 1
|
|
40
|
+
def wait(self): return 0
|
|
41
|
+
def poll(self): return 0
|
|
42
|
+
def spy(popen_cmd, *a, **kw):
|
|
43
|
+
seen["cmd"] = popen_cmd; seen["shell"] = kw.get("shell")
|
|
44
|
+
raise RuntimeError("stop-after-capture") # don't actually run pwsh on Linux
|
|
45
|
+
|
|
46
|
+
monkeypatch.setattr(T, "_SHELL_KIND", "powershell")
|
|
47
|
+
monkeypatch.setattr(T, "_SHELL_PATH", r"C:\ps\pwsh.exe")
|
|
48
|
+
monkeypatch.setattr(subprocess, "Popen", spy)
|
|
49
|
+
out = T.tool_bash({"command": "Get-ChildItem", "timeout": 5}, {"cwd": "."})
|
|
50
|
+
assert seen["shell"] is False
|
|
51
|
+
assert seen["cmd"][:4] == [r"C:\ps\pwsh.exe", "-NoProfile", "-NonInteractive", "-Command"]
|
|
52
|
+
assert seen["cmd"][4] == "Get-ChildItem"
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def test_prompt_note_windows_powershell():
|
|
56
|
+
with mock.patch("os.name", "nt"), \
|
|
57
|
+
mock.patch("shutil.which", side_effect=lambda n: "x" if n in ("pwsh", "powershell") else None):
|
|
58
|
+
assert "POWERSHELL" in tuning._shell_env_note()
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def test_prompt_note_windows_cmd():
|
|
62
|
+
with mock.patch("os.name", "nt"), mock.patch("shutil.which", return_value=None):
|
|
63
|
+
assert "cmd.exe" in tuning._shell_env_note()
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def test_prompt_note_empty_on_posix():
|
|
67
|
+
assert tuning._shell_env_note() == ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|