Skip to content

feat(*): skip postinstall env variable#22149

Open
helabenkhalfallah wants to merge 2 commits intodevelopfrom
feat/skip-postinstall-cds
Open

feat(*): skip postinstall env variable#22149
helabenkhalfallah wants to merge 2 commits intodevelopfrom
feat/skip-postinstall-cds

Conversation

@helabenkhalfallah
Copy link
Contributor

@helabenkhalfallah helabenkhalfallah commented Feb 6, 2026

This PR introduces environment-driven toggles to make installs more controllable in CI and local automation, with a focus on safely bypassing the postinstall hook when needed.

What’s changed

  • Postinstall skip toggle
    • Exposes skipPostInstall from process.env.SKIP_POST_INSTALL.
    • Adds isEnvOptionEnabled(option) helper to interpret env values as booleans (1|true|yes|y|on).

Why

The postinstall hook 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 modifying package.json or patching scripts.

Important note about skipping postinstall

Skipping postinstall also means skipping the PNPM-related setup/install step performed by manager-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 install

Accepted “enabled” values (case-insensitive): 1, true, yes, y, on.

Ticket Reference: #MANAGER-20638

Validation Tests

#22149 (comment)

ref: #MANAGER-20638

Signed-off-by: Héla Ben Khalfallah <helabenkhalfallah@hotmail.fr>
@helabenkhalfallah helabenkhalfallah requested a review from a team as a code owner February 6, 2026 17:10
@github-actions github-actions bot added the feature New feature label Feb 6, 2026
@helabenkhalfallah
Copy link
Contributor Author

Validation Tests

image image image image image image image image image

ref: #MANAGER-20638

Signed-off-by: Héla Ben Khalfallah <helabenkhalfallah@hotmail.fr>
@helabenkhalfallah helabenkhalfallah changed the title feat(*): skip postinstall env feat(*): skip postinstall env variable Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant