Skip to content

Fix empty string fallback for comment_package_manager#55

Merged
gonzaloriestra merged 1 commit intoregistry-and-package-managerfrom
fix-empty-package-manager-fallback
Apr 16, 2026
Merged

Fix empty string fallback for comment_package_manager#55
gonzaloriestra merged 1 commit intoregistry-and-package-managerfrom
fix-empty-package-manager-fallback

Conversation

@craigmichaelmartin
Copy link
Copy Markdown

When comment_package_manager input is not set, core.getInput() returns an empty string. Using nullish coalescing (??) fails to fall back to the auto-detected packageManager because empty string is not nullish. This causes the install command to render as i -g instead of npm i -g.

Switch to logical OR (||) so empty string correctly falls through to the detected package manager.

When comment_package_manager input is not set, core.getInput() returns
an empty string. Using nullish coalescing (??) fails to fall back to
the auto-detected packageManager because empty string is not nullish.
This causes the install command to render as 'i -g' instead of 'npm i -g'.

Switch to logical OR (||) so empty string correctly falls through to
the detected package manager.
@shopify-river shopify-river bot force-pushed the fix-empty-package-manager-fallback branch from 828ddad to 8051ff5 Compare April 15, 2026 19:49
@alfonso-noriega alfonso-noriega requested review from alfonso-noriega and removed request for alfonso-noriega April 16, 2026 09:42
@gonzaloriestra gonzaloriestra merged commit 0fec17d into registry-and-package-manager Apr 16, 2026
2 checks passed
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.

3 participants