Skip to content

Commit f86fd0c

Browse files
authored
Merge pull request #1 from memobank/patch-cwd-publish
fix(publish): fix wrong cwd when used in monorepo
2 parents df11027 + 00fe258 commit f86fd0c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/publish.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ module.exports = async (npmrc, {npmPublish, pkgRoot}, pkg, context) => {
2222
logger.log(`Publishing version ${version} to npm registry on dist-tag ${distTag}`);
2323
const result = execa(
2424
'npm',
25-
['publish', basePath, '--userconfig', npmrc, '--tag', distTag, '--registry', registry],
26-
{cwd, env}
25+
['publish', '--userconfig', npmrc, '--tag', distTag, '--registry', registry],
26+
{
27+
cwd: basePath,
28+
env
29+
}
2730
);
2831
result.stdout.pipe(stdout, {end: false});
2932
result.stderr.pipe(stderr, {end: false});

0 commit comments

Comments
 (0)