Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Change path of publish execution #930

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgc-gustavo-vieira
Copy link

I experienced an issue using this plugin with semantic-release-monorepo.
When I define the pkfRoot, even though everything is set correctly, the npm cli do not attempt to publish the folder in pkgRoot prop, but the root of the package instead.

ExecaError: Command failed with exit code 1: npm publish /home/runner/work/bgc-packages/bgc-packages/packages/value-objects/dist --userconfig /tmp/bcb7296253aa364112caea30f087dbce/.npmrc --tag SUS2089 --registry 'https://registry.npmjs.org/'

As the error above shows, The path is correct at the dist folder, but the npm cli reads from the folder value-objects, instead of value-objects/dist.
So I read this plugin trying to understand why the prepare command works fine and the publish not, and I found that in prepare command we change de cwd while the publish command we assign the npm cli this responsibility.

This PR changes this. Both commands will now point the current working directory to the path that was given by the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant