Skip to content

Commit da541e2

Browse files
committed
fix(sandbox): block delete inside an active sandbox run
Add check_sandbox_lock() to sandbox::delete for consistency with new, run, and set -- prevents silently deleting the sandbox you are currently running inside.
1 parent 3418fc9 commit da541e2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/sandbox.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ pub fn set(sandbox_id: Option<&str>, workspace_id: &str) {
341341
}
342342

343343
pub fn delete(sandbox_id: &str, workspace_id: &str) {
344+
check_sandbox_lock();
344345
let api = ApiClient::new(Some(workspace_id));
345346
let path = format!("/sandboxes/{sandbox_id}");
346347
let (status, resp_body) = api.delete_raw(&path);

0 commit comments

Comments
 (0)