Browse Source

prevent minimist from parsing an argument as an option value

otherwise:
`now -d /path`

would fail

protip cc @rase- @nkzawa
master
Guillermo Rauch 9 years ago
parent
commit
83b948f8d6
  1. 5
      bin/now-alias
  2. 6
      bin/now-deploy
  3. 6
      bin/now-list
  4. 6
      bin/now-remove

5
bin/now-alias

@ -6,7 +6,10 @@ import login from '../lib/login';
import * as cfg from '../lib/cfg';
import { error } from '../lib/error';
const argv = minimist(process.argv.slice(2));
const argv = minimist(process.argv.slice(2), {
// all options are booleans
boolean: true
});
const subcommand = argv._[0];
// options

6
bin/now-deploy

@ -13,7 +13,11 @@ import Now from '../lib';
import ms from 'ms';
import { handleError, error } from '../lib/error';
const argv = minimist(process.argv.slice(2));
const argv = minimist(process.argv.slice(2), {
// all options are booleans
boolean: true
});
const help = () => {
console.log(`
${chalk.bold('𝚫 now')} [options] <command | path>

6
bin/now-list

@ -10,7 +10,11 @@ import login from '../lib/login';
import * as cfg from '../lib/cfg';
import { handleError, error } from '../lib/error';
const argv = minimist(process.argv.slice(2));
const argv = minimist(process.argv.slice(2), {
// all options are booleans
boolean: true
});
const help = () => {
console.log(`
${chalk.bold('𝚫 now list')} [app]

6
bin/now-remove

@ -9,7 +9,11 @@ import login from '../lib/login';
import * as cfg from '../lib/cfg';
import { handleError, error } from '../lib/error';
const argv = minimist(process.argv.slice(2));
const argv = minimist(process.argv.slice(2), {
// all options are booleans
boolean: true
});
const deploymentId = argv._[0];
// options

Loading…
Cancel
Save