subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def _open_in_editor(path: Path): editor = os.environ.get("EDITOR") or os.environ.get("VISUAL") or "micro" try: subprocess.run([editor, str(path)]) except FileNotFoundError: print(c(f"Editor '{editor}' not found. Set $EDITOR env var.", YELLOW)) print(f"File saved at: {path}")- Confidence
- 95% confidence
- Finding
- subprocess.run([editor, str(path)])
