Skip to content

Commit

Permalink
Fix all variations of generateDisclaimer command to not have wrapper
Browse files Browse the repository at this point in the history
Previously 'yarn licenses generate-disclaimer' would not include the
output wrapper header and footer but other valid variations such as
'yarn licenses generateDisclaimer' would.

Fixes yarnpkg#1191
  • Loading branch information
tlent committed Oct 27, 2016
1 parent e207009 commit 76de57b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli/commands/licenses.js
Expand Up @@ -8,10 +8,11 @@ import {Install} from './install.js';
import Lockfile from '../../lockfile/wrapper.js';
import buildSubCommands from './_build-sub-commands.js';

const camelCase = require('camelcase');
const invariant = require('invariant');

export function hasWrapper(flags: Object, args: Array<string>): boolean {
return args[0] != 'generate-disclaimer';
return camelCase(args[0]) != 'generateDisclaimer';
}

export function setFlags(commander: Object) {
Expand Down

0 comments on commit 76de57b

Please sign in to comment.