Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(gatsby-dev-cli): Persist verdaccio stuff in os.tmpdir #13251

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

sidharthachatterjee
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee commented Apr 9, 2019

It currently persists in a dir two steps back (where gatsby-dev is) and sometimes that isn't writable because of an operation previously run with sudo like in https://circleci.com/gh/gatsbyjs/gatsby/104049?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

Note: require('os').tmpdir() is good in Node.js 4 and up. So we're fine.

@sidharthachatterjee sidharthachatterjee requested a review from a team as a code owner April 9, 2019 15:03
@@ -12,7 +13,7 @@ const { registerCleanupTask } = require(`./cleanup-tasks`)
let VerdaccioInitPromise = null

const verdaccioConfig = {
storage: path.join(__dirname, `..`, `..`, `verdaccio`, `storage`),
storage: path.join(os.tmpdir(), `verdaccio`, `storage`),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#branding 😛

Suggested change
storage: path.join(os.tmpdir(), `verdaccio`, `storage`),
storage: path.join(os.tmpdir(), `gatsby`, `verdaccio`, `storage`),

we could also write in node_modules/.cache/verdaccio

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to avoid node_modules because a sudo install could break permissions and cause the same issue as https://circleci.com/gh/gatsbyjs/gatsby/104049?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link?

Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, added a comment but feel free to merge

@sidharthachatterjee sidharthachatterjee merged commit d00ead5 into master Apr 9, 2019
@sidharthachatterjee sidharthachatterjee deleted the fix/verdaccio-storage-dir branch April 9, 2019 15:23
@sidharthachatterjee
Copy link
Contributor Author

Published in gatsby-dev-cli@2.4.15

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

Successfully merging this pull request may close these issues.

2 participants