File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import path from "node:path" ;
2+ import fs from "node:fs" ;
3+ import assert from "node:assert/strict" ;
24import { PrettierVersion , PrettierPullRequest , sourceTypes } from "../parse.ts" ;
35import * as configuration from "../configuration.ts" ;
46import * as brew from "../tools/brew.ts" ;
@@ -32,11 +34,14 @@ export async function installPrettier(prettierVersion: PrettierVersion) {
3234
3335 await pullRequestDirectory ?. dispatch ( ) ;
3436
37+ const prettierBinary = path . join ( cwd , "node_modules/prettier/bin/prettier.cjs" )
38+ assert . equal ( fs . existsSync ( prettierBinary ) , true )
39+
3540 return {
3641 dispatch : ( ) => {
3742 directory . dispatch ( ) ;
3843 } ,
39- bin : path . join ( cwd , "node_modules/prettier/bin/prettier.cjs" ) ,
44+ bin : prettierBinary ,
4045 } ;
4146}
4247
You can’t perform that action at this time.
0 commit comments