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

bun <script> "arg 1" "arg 2" from another package.json script does not preserve arguments #14229

Open
aboqasem opened this issue Sep 28, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@aboqasem
Copy link

aboqasem commented Sep 28, 2024

What version of Bun is running?

1.1.29+6d43b3662

What platform is your computer?

Darwin 23.6.0 x86_64 i386

What steps can reproduce the bug?

package.json:

{
	"scripts": {
		"f": "f() { echo first: $1; echo second: $2; }; f",
		"bf": "bun f \"should be first\" \"should be second\""
	}
}
❯ bun bf

What is the expected behavior?

$ bun f "should be first" "should be second"
$ f() { echo first: $1; echo second: $2; }; f "should be first" "should be second"
first: should be first
second: should be second

What do you see instead?

$ bun f "should be first" "should be second"
$ f() { echo first: $1; echo second: $2; }; f should be first should be second
first: should
second: be

Additional information

What I'm trying to achieve:

{
	"scripts": {
		"astro": "bun --bun x astro",
		"prettier": "bun --bun x prettier",
		"eslint": "bun --bun x eslint",
		"conc": "bun --bun x conc",
		"check": "bun conc \"astro check\" \"prettier . --check\" \"eslint .\""
}
@aboqasem aboqasem added bug Something isn't working needs triage labels Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant