feat(*): skip postinstall env variable#22149
Open
helabenkhalfallah wants to merge 2 commits intodevelopfrom
Open
feat(*): skip postinstall env variable#22149helabenkhalfallah wants to merge 2 commits intodevelopfrom
helabenkhalfallah wants to merge 2 commits intodevelopfrom
Conversation
ref: #MANAGER-20638 Signed-off-by: Héla Ben Khalfallah <helabenkhalfallah@hotmail.fr>
Contributor
Author
ref: #MANAGER-20638 Signed-off-by: Héla Ben Khalfallah <helabenkhalfallah@hotmail.fr>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









This PR introduces environment-driven toggles to make installs more controllable in CI and local automation, with a focus on safely bypassing the
postinstallhook when needed.What’s changed
skipPostInstallfromprocess.env.SKIP_POST_INSTALL.isEnvOptionEnabled(option)helper to interpret env values as booleans (1|true|yes|y|on).Why
The
postinstallhook can be expensive or undesirable in certain contexts (e.g., CI optimization, debugging, local scripts, constrained environments). This PR makes it easy to disable the hook without modifyingpackage.jsonor patching scripts.Important note about skipping postinstall
Skipping
postinstallalso means skipping the PNPM-related setup/install step performed bymanager-pm(dependency linking / PNPM install workflow).As a result, this option is only recommended when you explicitly want to focus on Yarn-only workflows and temporarily skip PNPM.
How to use
Skip the postinstall hook by setting:
SKIP_POST_INSTALL=true yarn install # or SKIP_POST_INSTALL=1 yarn installAccepted “enabled” values (case-insensitive): 1, true, yes, y, on.
Ticket Reference: #MANAGER-20638
Validation Tests
#22149 (comment)