diff --git a/scripts/generate-clients/code-prettify.js b/scripts/generate-clients/code-prettify.js index 14ba9be5b0cc..6f47e98e1de1 100644 --- a/scripts/generate-clients/code-prettify.js +++ b/scripts/generate-clients/code-prettify.js @@ -1,8 +1,9 @@ // @ts-check const { spawnProcess } = require("./spawn-process"); +const path = require("path"); const prettifyCode = async (dir) => { - await spawnProcess("./node_modules/.bin/prettier", ["--write", `${dir}/**/*.{ts,js,md,json}`]); + await spawnProcess(path.join(__dirname, "..", "..", "node_modules", ".bin", "prettier"), ["--write", `${dir}/**/*.{ts,js,md,json}`]); }; module.exports = {