Skip to content

Commit e67ab52

Browse files
authored
fix: resolve pkgDir to absolute path (#25)
1 parent 71e1435 commit e67ab52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function getPackageInfo(
2020
pkgName: string,
2121
getPkgDir: ((pkg: string) => string) | undefined = (pkg) => `packages/${pkg}`,
2222
) {
23-
const pkgDir = getPkgDir(pkgName);
23+
const pkgDir = path.resolve(getPkgDir(pkgName));
2424
const pkgPath = path.resolve(pkgDir, "package.json");
2525
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8")) as {
2626
name: string;
@@ -135,7 +135,7 @@ export function updateVersion(pkgPath: string, version: string): void {
135135
}
136136

137137
export async function publishPackage(
138-
pkdDir: string,
138+
pkgDir: string,
139139
tag?: string,
140140
provenance?: boolean,
141141
): Promise<void> {
@@ -147,7 +147,7 @@ export async function publishPackage(
147147
publicArgs.push(`--provenance`);
148148
}
149149
await runIfNotDry("npm", publicArgs, {
150-
cwd: pkdDir,
150+
cwd: pkgDir,
151151
});
152152
}
153153

0 commit comments

Comments
 (0)