Skip to content

Commit

Permalink
Revert "Remove --preview as a required argument for ruff server (#…
Browse files Browse the repository at this point in the history
…12053)"

This reverts commit b28dc9a.
  • Loading branch information
dhruvmanila committed Jul 5, 2024
1 parent 1e07bfa commit 958f286
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/ruff/src/commands/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ use crate::ExitStatus;
use anyhow::Result;
use ruff_server::Server;

pub(crate) fn run_server(_preview: bool, worker_threads: NonZeroUsize) -> Result<ExitStatus> {
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);
}

let server = Server::new(worker_threads)?;

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

0 comments on commit 958f286

Please sign in to comment.