Skip to content

Commit

Permalink
fix: fix getYarnRc cwd pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeents committed Mar 7, 2023
1 parent 505e5f2 commit d0c96fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ export async function getYarnRc(cwd: string) {
let yarnRc: Record<string, string>;

try {
yarnRc = (await yaml.load(
fs.readFileSync(`${cwd}/.yarnrc.yml`, 'utf8'),
)) as Record<string, string>;
yarnRc = (await yaml.load(fs.readFileSync(cwd, 'utf8'))) as Record<
string,
string
>;
} catch (err) {
const { code } = err as { code?: string };
if (code === 'ENOENT') throw error(ErrorTypes.MISSING_PACKAGE);
Expand Down

0 comments on commit d0c96fa

Please sign in to comment.