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

The "--concurrency" option of the "turbo run" command cannot be specified as a percentage #1336

@ryu-sato

Description

@ryu-sato

What version of Turborepo are you using?

1.2.16

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

Yarn v1

What operating system are you using?

Linux

Describe the Bug

The "--concurrency" option of the "turbo run" command cannot be specified as a percentage.

$ yarn run turbo run lint --concurrency="100%"
yarn run v1.22.4
$ /tmp/my-turborepo/node_modules/.bin/turbo run lint --concurrency=100%
 ERROR  invalid argument "100%" for "--concurrency" flag: strconv.ParseInt: parsing "100%": invalid syntax
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected Behavior

Use specified percent cores of all available logical processors.

The following documents are used as reference.
https://github.com/vercel/turborepo/blob/main/docs/pages/docs/reference/command-line-reference.mdx#--concurrency

Use 100% to use all available logical processors. This option is ignored if the --parallel flag is also passed.

To Reproduce

  1. Prepare monorepo with turborepo (name: my-turborepo, use yarn)
$ npx create-turbo@latest
  1. Run "turbo run" command with "--concurrency" option in percent style
$ cd my-turborepo
$ yarn run turbo run lint --concurrency="100%"
yarn run v1.22.4
$ /tmp/my-turborepo/node_modules/.bin/turbo run lint --concurrency=100%
 ERROR  invalid argument "100%" for "--concurrency" flag: strconv.ParseInt: parsing "100%": invalid syntax
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Metadata

Metadata

Assignees

Labels

kind: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions