Skip to content

Commit

Permalink
fix: refactor fs import
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvin8 committed Jul 28, 2024
1 parent 848fe54 commit d246c28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/helpers/getRepoRoot.ts
Original file line number Diff line number Diff line change
@@ -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<string> {
const fs = { promises: fsPromises, readFile, stat, readdir };
const repoRoot = await git.findRoot({
fs: { ...fs, promises: fs.promises },
fs,
filepath: process.cwd(),
});
return repoRoot;
Expand Down

0 comments on commit d246c28

Please sign in to comment.