---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [cli](../index.md) / augmentDuplicateFlagError

# Function: augmentDuplicateFlagError()

> **augmentDuplicateFlagError**(`message`, `flags`): `string`

Defined in: [packages/b2c-tooling-sdk/src/cli/base-command.ts:100](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/cli/base-command.ts#L100)

oclif throws `Flag --<name> can only be specified once` when a non-multiple
flag is passed more than once — including when the duplicate arrived through
an alias (e.g. `-p my-store -s other`, where `-s` / `--storefront` are aliases
of `--project`). The bare message names only the canonical flag, so a user who
typed an alias can't tell what collided. When the offending flag has aliases,
rewrite the message to list every long and short form it accepts.

## Parameters

### message

`string`

### flags

`Record`\<`string`, `unknown`\>

## Returns

`string`
