这是indexloc提供的服务,不要输入任何密码
Skip to content

Turbo is sending arg -- (ignore-option) as first argument to script. #1477

@erickponce

Description

@erickponce

What version of Turborepo are you using?

1.3.1

What package manager are you using / does the bug impact?

Yarn v2/v3 (node_modules linker only)

What operating system are you using?

Mac

Describe the Bug

Turbo is sending arg -- (ignore-option) as first argument to script...
this will break a library that are aware of this option, as it will ignore all args after --. (like yargs)

So for a command turbo build test -- --my-script-arg=test:
the script will receive in its ${@} 2 args, -- and --my-script-arg=test.

Expected Behavior

Turbo should forward all args after --, but not including -- as first arg.

To Reproduce

  1. Create a script that echoe ${@}
  2. then call the script with Turbo, along with some script args like turbo my-script -- --my-arg=test
  3. the script will echo -- --my-arg=test and not --my-arg=test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions