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)" (#12196)

This reverts commit b28dc9a.

We're not ready to stabilize the server yet. There's some pending work
for the VS Code extension and documentation improvements.

This change is to unblock Ruff release.
  • Loading branch information
dhruvmanila authored Jul 5, 2024
1 parent 1e07bfa commit f3ccd15
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 f3ccd15

Please sign in to comment.