Skip to content
Open
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
2 changes: 2 additions & 0 deletions runpod/cli/groups/exec/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def get_session_pod():

# If file doesn't exist or is empty, prompt user for the pod_id
pod_id = click.prompt("Please provide the pod ID")
if get_pod(pod_id) is None:
raise click.ClickException("Invalid pod ID.")
os.makedirs(os.path.dirname(POD_ID_FILE), exist_ok=True)
with open(POD_ID_FILE, "w", encoding="UTF-8") as pod_file:
pod_file.write(pod_id)
Expand Down