Skip to content

Commit f4f09c0

Browse files
authored
Skip version check for ty (#747)
1 parent ab433c4 commit f4f09c0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/common/server.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,13 @@ async function createNativeServer(
176176

177177
logger.info(`Found Ruff ${versionToString(ruffVersion)} at ${ruffBinaryPath}`);
178178

179-
const isRedKnot = ruffBinaryPath.endsWith("red_knot") || ruffBinaryPath.endsWith("red_knot.exe");
179+
const isTy =
180+
ruffBinaryPath.endsWith("ty") ||
181+
ruffBinaryPath.endsWith("ty.exe") ||
182+
ruffBinaryPath.endsWith("red_knot") ||
183+
ruffBinaryPath.endsWith("red_knot.exe");
180184

181-
if (!isRedKnot) {
185+
if (!isTy) {
182186
if (!supportsNativeServer(ruffVersion)) {
183187
const message =
184188
`Native server requires Ruff ${versionToString(
@@ -197,7 +201,7 @@ async function createNativeServer(
197201
}
198202

199203
let ruffServerArgs: string[];
200-
if (isRedKnot) {
204+
if (isTy) {
201205
ruffServerArgs = [RUFF_SERVER_SUBCOMMAND];
202206
} else if (supportsStableNativeServer(ruffVersion)) {
203207
ruffServerArgs = [RUFF_SERVER_SUBCOMMAND];

0 commit comments

Comments
 (0)