diff --git a/src/helpers/getRepoRoot.ts b/src/helpers/getRepoRoot.ts index 8d5ad2f..d09daee 100644 --- a/src/helpers/getRepoRoot.ts +++ b/src/helpers/getRepoRoot.ts @@ -1,10 +1,11 @@ 'use strict'; -import * as fs from 'node:fs'; +import { promises as fsPromises, readFile, stat, readdir } from 'node:fs'; import git from 'isomorphic-git'; export async function getRepoRoot(): Promise { + const fs = { promises: fsPromises, readFile, stat, readdir }; const repoRoot = await git.findRoot({ - fs: { ...fs, promises: fs.promises }, + fs, filepath: process.cwd(), }); return repoRoot;