Skip to content

Conversation

@mandelbro
Copy link
Contributor

@mandelbro mandelbro commented Sep 19, 2025

In order to make heroku run commands more intuitive by ensuring that common/expected binaries are in the dyno's path, we need to add "-- launcher" to the beginning of every command that users want to run. For example, if the user runs the command heroku run bash -a MY_APP, the command should be called as "heroku run -- launcher bash -a MY_APP".

Since there may be cases where user want to run the command without using "launcher", this change includes a param --no-launcher which can be used to remove it from the command.

This change was previously introduced to the heroku run:inside command in #3116, so I refactored that command to use the shared helper that is used by heroku run.

SOC 2 Compliance

GUS work item
Slack thread

…allback to disable

Introduces a --no-launcher flag to both the run and run:detached commands, allowing users to prevent the automatic prepending of 'launcher' to commands on CNB apps. Updates command descriptions and integration tests to cover the new flag.
…ing `-- launcher`

Replaces the use of buildCommand and app stack checks with buildCommandWithLauncher for constructing the dyno command. This simplifies logic and centralizes launcher handling.
@mandelbro mandelbro requested a review from a team as a code owner September 19, 2025 20:46
Copy link
Contributor

@eablack eablack left a comment

Choose a reason for hiding this comment

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

can we add a test to unit/lib/run/helpers.unit.test.ts for the new buildCommandWithLauncher function? otherwise, LGTM! nice work!

Introduces unit tests for the buildCommandWithLauncher function, covering CNB and non-CNB app scenarios and the launcher disable flag.
@mandelbro mandelbro merged commit f3c4e6d into main Sep 19, 2025
8 checks passed
@mandelbro mandelbro deleted the montes/feat/prepend-launcher-to-fir-run-commands branch September 19, 2025 22:11
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.

2 participants