Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Fix file does not exist
  • Loading branch information
savannahostrowski committed Dec 11, 2025
commit b3b6fffbe5d5c8c9ec828ec9a8981fb769709664
4 changes: 4 additions & 0 deletions Lib/profiling/sampling/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@ def _handle_attach(args):

def _handle_run(args):
"""Handle the 'run' command."""
# Validate script exists (only for scripts, not modules)
if not args.module and not os.path.exists(args.target):
sys.exit(f"Error: script not found: {args.target}")

# Check if live mode is requested
if args.live:
_handle_live_run(args)
Expand Down