CLI: Determine if cwd is within _any_ JP monorepo #20426
Labels
[Closed] Won't Fix
wontfix. This issue will not be addressed.
[Tools] Development CLI
The tools/cli to assist during JP development.
[Type] Bug
When a feature is broken and / or not performing as intended
Steps to reproduce the issue
jetpack build plugins/jetpack
What I expected
The second copy has Jetpack built.
What happened instead
The first copy built Jetpack.
See discussion at p1626875884194600/1626874210.189400-slack-CBG1CP4EN
What's happening is in the Jetpack bin, we're setting the cwd to the monorepo root of the bin. We do this so you can use the CLI from any point in the monorepo without worrying about needing to be at the monorepo root.
We should detect if we're within a Jetpack monorepo and, if we are, use that monorepo's root. If we're not within one, I suppose using the bin's root is sufficient (or should we error? I could see docker commands being used outside of the monorepo?)
The text was updated successfully, but these errors were encountered: