Skip to content

Commit 02af1ca

Browse files
committed
fix: platform is not defined
1 parent d3da456 commit 02af1ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/rslint/src/service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ export class RSLintService {
6363
private expectedSize: number | null;
6464

6565
constructor(options: RSlintOptions = {}) {
66+
const defaultPath = `@rslint/${platform()}-${arch()}/bin`;
67+
6668
this.nextMessageId = 1;
6769
this.pendingMessages = new Map();
68-
this.rslintPath =
69-
options.rslintPath ||
70-
require.resolve(`@rslint/${platform()}-${arch()}/bin`);
70+
this.rslintPath = options.rslintPath || require.resolve(defaultPath);
7171

7272
this.process = spawn(this.rslintPath, ['--api'], {
7373
stdio: ['pipe', 'pipe', 'inherit'],

0 commit comments

Comments
 (0)