From 76de57ba6c031c8fe5525b40c5a3d131b620057a Mon Sep 17 00:00:00 2001 From: Thomas Lent Date: Thu, 27 Oct 2016 19:41:00 -0400 Subject: [PATCH] Fix all variations of generateDisclaimer command to not have wrapper 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 #1191 --- src/cli/commands/licenses.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/commands/licenses.js b/src/cli/commands/licenses.js index 8140d9c5a6..3684fcd8ab 100644 --- a/src/cli/commands/licenses.js +++ b/src/cli/commands/licenses.js @@ -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): boolean { - return args[0] != 'generate-disclaimer'; + return camelCase(args[0]) != 'generateDisclaimer'; } export function setFlags(commander: Object) {