diff --git a/internal/permission/permission.go b/internal/permission/permission.go index de261c62dad974a71d148c5c5c2531c0a5aecc78..3492885c05fdb8a3167757d9e4c20388de0be6df 100644 --- a/internal/permission/permission.go +++ b/internal/permission/permission.go @@ -1,12 +1,10 @@ package permission import ( - "context" "errors" "path/filepath" "slices" "sync" - "time" "github.com/charmbracelet/crush/internal/config" "github.com/charmbracelet/crush/internal/pubsub" @@ -117,15 +115,10 @@ func (s *permissionService) Request(opts CreatePermissionRequest) bool { s.Publish(pubsub.CreatedEvent, permission) - // Wait for the response with a timeout to prevent indefinite blocking - ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute) - defer cancel() - + // Wait for the response indefinitely select { case resp := <-respCh: return resp - case <-ctx.Done(): - return false // Timeout - deny by default } }