Browse Source

Do not hang forever if not on a TTY

master
Matheus Fernandes 8 years ago
parent
commit
5682d00bf3
No known key found for this signature in database GPG Key ID: DD07CA4EA7B65C4F
  1. 7
      bin/now-deploy.js

7
bin/now-deploy.js

@ -607,6 +607,7 @@ async function sync(token) {
const plan = await planPromise; const plan = await planPromise;
if (plan.id === 'oss') { if (plan.id === 'oss') {
if (isTTY) {
info( info(
`You are on the OSS plan. Your code will be made ${chalk.bold('public')}.` `You are on the OSS plan. Your code will be made ${chalk.bold('public')}.`
); );
@ -631,6 +632,12 @@ async function sync(token) {
info(`You can upgrade by running ${cmd('now upgrade')}.`); info(`You can upgrade by running ${cmd('now upgrade')}.`);
return exit(); return exit();
} }
} else if (!wantsPublic) {
let msg = '\nYou are on the OSS plan. Your code will be made public.';
msg += ' If you agree with that, please run again with --public.';
console.log(msg);
return exit(1);
}
} }
if (now.syncAmount) { if (now.syncAmount) {

Loading…
Cancel
Save