Skip to content

Commit

Permalink
Remove --preview as a required flag for ruff server
Browse files Browse the repository at this point in the history
  • Loading branch information
snowsignal committed Jun 26, 2024
1 parent 55f4812 commit b2254b0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/ruff/src/commands/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ use crate::ExitStatus;
use anyhow::Result;
use ruff_server::Server;

pub(crate) fn run_server(preview: bool, worker_threads: NonZeroUsize) -> Result<ExitStatus> {
if !preview {
tracing::error!("--preview needs to be provided as a command line argument while the server is still unstable.\nFor example: `ruff server --preview`");
return Ok(ExitStatus::Error);
}

pub(crate) fn run_server(_preview: bool, worker_threads: NonZeroUsize) -> Result<ExitStatus> {
let server = Server::new(worker_threads)?;

server.run().map(|()| ExitStatus::Success)
Expand Down

0 comments on commit b2254b0

Please sign in to comment.