You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
383 B
15 lines
383 B
#!/usr/bin/env node
|
|
import login from '../lib/login';
|
|
import chalk from 'chalk';
|
|
|
|
console.log(`> ${chalk.bold('Authenticating…')}`);
|
|
|
|
login()
|
|
.then(() => {
|
|
console.log('> Logged in successfully. Token saved in ~/.now.json');
|
|
process.exit(0);
|
|
})
|
|
.catch((err) => {
|
|
console.error(`> Error. Login filed: (${err.message})`);
|
|
console.error(`> Run \`now --login\` to retry`);
|
|
});
|
|
|