File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable n/no-sync */
1
2
import path from 'node:path' ;
2
3
import os from 'node:os' ;
3
4
import fs from 'node:fs/promises' ;
4
5
import phpfmt from 'phpfmt' ;
6
+ import { execSync } from 'node:child_process' ;
5
7
import { dirname } from 'dirname-filename-esm' ;
6
8
import { consola } from 'consola' ;
7
9
import { got } from 'got' ;
8
10
import JSON5 from 'json5' ;
9
11
import { markdownTable } from 'markdown-table' ;
10
- import { exec } from '../src/utils' ;
11
12
12
13
// eslint-disable-next-line @typescript-eslint/naming-convention
13
14
const __dirname = dirname ( import . meta) ;
@@ -20,10 +21,7 @@ const configuration = pkg.contributes.configuration;
20
21
21
22
try {
22
23
// 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' ) ;
27
25
28
26
consola . info ( 'Downloading phpfmt.sublime-settings...' ) ;
29
27
const phpfmtSettingsRaw = await got
You can’t perform that action at this time.
0 commit comments