Skip to content

Commit ff8b8be

Browse files
committed
Fix create formatting path
1 parent 8c6c1b2 commit ff8b8be

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

packages/cli/src/utils/prompts.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as prompts from '@voidzero-dev/vite-plus-prompts';
22

33
import { downloadPackageManager as downloadPackageManagerBinding } from '../../binding/index.js';
4-
import { fmt as resolveFmt } from '../resolve-fmt.js';
54
import { PackageManager } from '../types/index.js';
65
import { runCommandSilently } from './command.js';
76
import { accent } from './terminal.js';
@@ -109,15 +108,11 @@ export async function runViteFmt(
109108
const startTime = Date.now();
110109
spinner.start(`Formatting code...`);
111110

112-
const { binPath, envs } = await resolveFmt();
113111
const { exitCode, stderr, stdout } = await runCommandSilently({
114-
command: binPath,
115-
args: ['--write', ...(paths ?? [])],
112+
command: process.env.VITE_PLUS_CLI_BIN ?? 'vp',
113+
args: ['fmt', '--write', ...(paths ?? [])],
116114
cwd,
117-
envs: {
118-
...process.env,
119-
...envs,
120-
},
115+
envs: process.env,
121116
});
122117

123118
if (exitCode === 0) {

0 commit comments

Comments
 (0)