Skip to content

Commit

Permalink
Merge pull request #27 from mcarvin8/fix/import
Browse files Browse the repository at this point in the history
fix: refactor fs import
  • Loading branch information
mcarvin8 authored Jul 28, 2024
2 parents 848fe54 + d246c28 commit 711c46c
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 711c46c

Please sign in to comment.