Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Resolve absolute path for start action #2228

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

colinhacks
Copy link
Contributor

@colinhacks colinhacks commented Aug 9, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

The start command breaks when nest start is executed with bun (bunx nest start). This is because Node supports running a file w/o an extension (node /path/to/dist/main) but Bun requires an extension.
Issue Number: N/A

What is the new behavior?

Per #2223

This uses require.resolve to resolve the entrypoint to an absolute file path before starting the child process.

Before: /Users/colinmcd94/Documents/repos/nest-cli/nest-app/dist/main
After: /Users/colinmcd94/Documents/repos/nest-cli/nest-app/dist/main.js

This will behave identically to before when using Node, and fixes the command for Bun.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@colinhacks colinhacks changed the title fix: Resolve absolute path for start action fix: Resolve absolute path for start action Aug 10, 2023
@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec merged commit f5f2d44 into nestjs:master Aug 16, 2023
1 check 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