oven-sh/bun

when passing arguments to `bun run` it escapes double quotes

已关闭

#7,667 创建于 2023年12月15日

 (4 条评论) (3 个反应) (0 位负责人)Rust (4,486 个派生)batch import
bugbun installgood first issue

仓库指标

星标
 (90,348 个星标)
PR 合并指标
 (平均合并 1天 17小时) (30 天内合并 357 个 PR)

描述

What version of Bun is running?

1.0.18+36c316a24

What platform is your computer?

Linux 5.15.0-58-generic x86_64 x86_64

What steps can reproduce the bug?

  1. add a command containing double quotes to package.json scripts
{
  "scripts": {
    "foo": "echo \"ONE\" TWO",
  }
}
  1. call bun run foo
  2. call bun run foo THREE

What is the expected behavior?

> bun run foo 
$ echo "ONE" TWO
ONE TWO
> bun run foo THREE
$ echo "ONE" TWO THREE
ONE TWO THREE
> 

What do you see instead?

> bun run foo 
$ echo "ONE" TWO
ONE TWO
> bun run foo THREE
$ echo \"ONE\" TWO THREE
"ONE" TWO THREE
>

贡献者指南