Skip to content

Commit 7a0ef98

Browse files
committed
fix: build
1 parent 2185281 commit 7a0ef98

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/docs.mts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
/* eslint-disable n/no-sync */
12
import path from 'node:path';
23
import os from 'node:os';
34
import fs from 'node:fs/promises';
45
import phpfmt from 'phpfmt';
6+
import { execSync } from 'node:child_process';
57
import { dirname } from 'dirname-filename-esm';
68
import { consola } from 'consola';
79
import { got } from 'got';
810
import JSON5 from 'json5';
911
import { markdownTable } from 'markdown-table';
10-
import { exec } from '../src/utils';
1112

1213
// eslint-disable-next-line @typescript-eslint/naming-convention
1314
const __dirname = dirname(import.meta);
@@ -20,10 +21,7 @@ const configuration = pkg.contributes.configuration;
2021

2122
try {
2223
// check php first
23-
const { code } = await exec('php -v');
24-
if (code !== 0) {
25-
throw new Error('php -v failed');
26-
}
24+
execSync('php -v');
2725

2826
consola.info('Downloading phpfmt.sublime-settings...');
2927
const phpfmtSettingsRaw = await got

0 commit comments

Comments
 (0)