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

fix: postinstall false negative deps warning #1318

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

Weakky
Copy link
Collaborator

@Weakky Weakky commented Aug 3, 2020

closes #1280

TODO

  • docs
    • jsdoc
    • website api
    • website guides
    • website tutorial
  • tests

@Weakky Weakky requested a review from jasonkuhrt August 3, 2020 16:29
Copy link
Member

@jasonkuhrt jasonkuhrt left a comment

Choose a reason for hiding this comment

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

🙃 it works? 🚢

// npm uses __dirname as CWD in a postinstall hook. We use INIT_CWD instead if available (set by npm)
// https://github.com/npm/npm/issues/16990#issuecomment-349731142
const cwd = process.env.INIT_CWD || process.cwd()
const cwd = process.cwd()
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure that process.cwd function will respect the current state of process.chdir?

Copy link
Member

Choose a reason for hiding this comment

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

Or is the point that it doesn't and that's what we want?

Bottom line is we want this to be the project root right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes we're sure otherwise it wouldn't have fixed the deps warning!

@Weakky
Copy link
Collaborator Author

Weakky commented Aug 3, 2020

Yes it works, just tried it locally!

@Weakky Weakky merged commit 57aaf76 into master Aug 3, 2020
@Weakky Weakky deleted the fix/postinstall-deps-check branch August 3, 2020 16:57
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.

Confusing install output about dependencies
2 participants