fixed overwriting existing tokens

pull/29/head
tycrek 3 years ago
parent 95349e4b55
commit c10cdc6c50
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -202,11 +202,14 @@ function doSetup() {
.then(() => {
// Make sure auth.json exists and generate the first key
if (!fs.existsSync(path('auth.json'))) {
let users = {};
users[token()] = { username: 'ass', count: 0 };
fs.writeJsonSync(path('auth.json'), { users }, { spaces: 4 });
log.debug('File created', 'auth.json')
.success('!! Important', `Save this token in a secure spot: ${Object.keys(users)[0]}`)
.blank();
}
let existingData = {}
try {

Loading…
Cancel
Save