kdebug 0.7.1__tar.gz → 0.7.3__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.
- {kdebug-0.7.1 → kdebug-0.7.3}/PKG-INFO +1 -1
- {kdebug-0.7.1 → kdebug-0.7.3}/pyproject.toml +1 -1
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/backup.py +1 -1
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/cli.py +5 -2
- {kdebug-0.7.1 → kdebug-0.7.3}/.gitignore +0 -0
- {kdebug-0.7.1 → kdebug-0.7.3}/README.md +0 -0
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/__init__.py +0 -0
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/completions/__init__.py +0 -0
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/completions/_kdebug +0 -0
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/completions/kdebug.bash +0 -0
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/completions/kdebug.fish +0 -0
- {kdebug-0.7.1 → kdebug-0.7.3}/src/kdebug/debug.py +0 -0
|
@@ -21,6 +21,7 @@ import importlib.resources
|
|
|
21
21
|
import json
|
|
22
22
|
import os
|
|
23
23
|
import re
|
|
24
|
+
import shlex
|
|
24
25
|
import subprocess
|
|
25
26
|
import sys
|
|
26
27
|
import termios
|
|
@@ -105,8 +106,10 @@ def run_command(cmd: str, check: bool = True, use_bash: bool = False) -> Optiona
|
|
|
105
106
|
["bash", "-c", cmd], capture_output=True, text=True, check=check
|
|
106
107
|
)
|
|
107
108
|
else:
|
|
109
|
+
# Run as a direct exec (no shell) so kubectl works in environments
|
|
110
|
+
# where /bin/sh is absent (distroless / minimal container images).
|
|
108
111
|
result = subprocess.run(
|
|
109
|
-
|
|
112
|
+
shlex.split(cmd), capture_output=True, text=True, check=check
|
|
110
113
|
)
|
|
111
114
|
return result.stdout.strip()
|
|
112
115
|
except subprocess.CalledProcessError as e:
|
|
@@ -849,7 +852,7 @@ def cleanup_debug_container(
|
|
|
849
852
|
f"{kubectl_base_cmd()} exec {pod_name} "
|
|
850
853
|
f"-n {namespace} "
|
|
851
854
|
f"-c {debug_container} "
|
|
852
|
-
f"--
|
|
855
|
+
f"-- sh -c 'kill -9 1' 2>/dev/null || true"
|
|
853
856
|
)
|
|
854
857
|
|
|
855
858
|
run_command(cmd, check=False)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|