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

Accepting bun in shebang #487

Open
bersace opened this issue Feb 5, 2025 · 3 comments
Open

Accepting bun in shebang #487

bersace opened this issue Feb 5, 2025 · 3 comments

Comments

@bersace
Copy link

bersace commented Feb 5, 2025

Hi,

Running postcss with bun works just fine, except I have do edit the shebang.

Do you think it would be possible do build an alternative shebang to use bun instead ?

Regards,
Étienne

@endic-sam928281
Copy link

Hello, we tried to solve the issue.

This is what we did:

Modified the shebang in index.js to use /usr/bin/env, which allows the script to work with both Node.js and Bun runtimes. This change maintains compatibility with existing Node.js usage while adding support for Bun.

You can review changes in this commit: endic-sam928281@866aaae.

Caution

Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

@RyanZim
Copy link
Collaborator

RyanZim commented Feb 5, 2025

I think as per https://bun.sh/docs/cli/run#bun, you simply need to run it with bun run --bun postcss .. to bypass the shebang issue. (Not a bun user, so have not tested)

@bersace
Copy link
Author

bersace commented Feb 6, 2025

I think as per https://bun.sh/docs/cli/run#bun, you simply need to run it with bun run --bun postcss .. to bypass the shebang issue. (Not a bun user, so have not tested)

Yes, it runs. I need to find  solution to tell this to hugo or have oven-sh/bun#3417 implemented.

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

No branches or pull requests

3 participants