Skip to content

Commit

Permalink
fix(add, upgrade): fix audit flag (yarnpkg#7326)
Browse files Browse the repository at this point in the history
* fix(add, upgrade): fix audit flag

* Update CHANGELOG.md
  • Loading branch information
dsanders11 authored and Vincent Bailly committed Jun 10, 2020
1 parent d34b305 commit 7d80282
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,7 +4,11 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

## Master

- Adds support for --offline flag to global add command
- Fixes audits when used with `yarn add` & `yarn upgrade`

[#7326](https://github.com/yarnpkg/yarn/pull/7326) - [**David Sanders**](https://github.com/dsanders11)

- Adds support for the `--offline` flag to `yarn global add`

[#7330](https://github.com/yarnpkg/yarn/pull/7330) - [**Francis Crick**](https://guthub.com/fcrick)

Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/add.js
Expand Up @@ -300,7 +300,7 @@ export function setFlags(commander: Object) {
commander.option('-O, --optional', 'save package to your `optionalDependencies`');
commander.option('-E, --exact', 'install exact version');
commander.option('-T, --tilde', 'install most recent release with the same minor version');
commander.option('-A', '--audit', 'Run vulnerability audit on installed packages');
commander.option('-A, --audit', 'Run vulnerability audit on installed packages');
}

export async function run(config: Config, reporter: Reporter, flags: Object, args: Array<string>): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/upgrade.js
Expand Up @@ -158,7 +158,7 @@ export function setFlags(commander: Object) {
'-C, --caret',
'install most recent release with the same major version. Only used when --latest is specified.',
);
commander.option('-A', '--audit', 'Run vulnerability audit on installed packages');
commander.option('-A, --audit', 'Run vulnerability audit on installed packages');
}

export function hasWrapper(commander: Object, args: Array<string>): boolean {
Expand Down

0 comments on commit 7d80282

Please sign in to comment.