Skip to content

Commit f3ccd15

Browse files
authored
Revert "Remove --preview as a required argument for ruff server (#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.
1 parent 1e07bfa commit f3ccd15

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/ruff/src/commands/server.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ use crate::ExitStatus;
44
use anyhow::Result;
55
use ruff_server::Server;
66

7-
pub(crate) fn run_server(_preview: bool, worker_threads: NonZeroUsize) -> Result<ExitStatus> {
7+
pub(crate) fn run_server(preview: bool, worker_threads: NonZeroUsize) -> Result<ExitStatus> {
8+
if !preview {
9+
tracing::error!("--preview needs to be provided as a command line argument while the server is still unstable.\nFor example: `ruff server --preview`");
10+
return Ok(ExitStatus::Error);
11+
}
12+
813
let server = Server::new(worker_threads)?;
914

1015
server.run().map(|()| ExitStatus::Success)

0 commit comments

Comments
 (0)