Skip to content

Commit

Permalink
fix: spread args to mono-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg committed Oct 2, 2019
1 parent 5fd64c4 commit 7499dd3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/commands/external.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ExternalCommand {
if (!pkgLoc) {
pkgLoc = await ExternalCommand.promptInstallation(scopeName, name);
}
return pkgLoc ? require(pkgLoc).default(args) : null;
return pkgLoc ? require(pkgLoc).default(...args) : null;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const AUTO_PREFIX = "--auto";
*/

export default function initializeInquirer(...args: string[]): Function | void {
const packages = args.slice(3);
const packages = args;
const includesDefaultPrefix = packages.includes(AUTO_PREFIX);
if (packages.length === 0 || includesDefaultPrefix) {
return modifyConfigHelper("init", defaultGenerator, null, null, includesDefaultPrefix);
Expand Down
2 changes: 1 addition & 1 deletion packages/migrate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function runMigration(currentConfigPath: string, outputConfigPath: string): Prom
*/

export default function migrate(...args: string[]): void | Promise<void> {
const filePaths = args.slice(3);
const filePaths = args;
if (!filePaths.length) {
const errMsg = "\n ✖ Please specify a path to your webpack config \n ";
console.error(chalk.red(errMsg));
Expand Down

0 comments on commit 7499dd3

Please sign in to comment.