File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as prompts from '@voidzero-dev/vite-plus-prompts' ;
22
33import { downloadPackageManager as downloadPackageManagerBinding } from '../../binding/index.js' ;
4- import { fmt as resolveFmt } from '../resolve-fmt.js' ;
54import { PackageManager } from '../types/index.js' ;
65import { runCommandSilently } from './command.js' ;
76import { 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 ) {
You can’t perform that action at this time.
0 commit comments