зеркало из https://github.com/mozilla/hubs.git
11 строки
321 B
JavaScript
11 строки
321 B
JavaScript
import { readFileSync, existsSync, unlinkSync } from "fs";
|
|
|
|
if (!existsSync(".ret.credentials")) {
|
|
console.log("Not logged in. To log in, run npm run login.");
|
|
process.exit(0);
|
|
}
|
|
|
|
const creds = JSON.parse(readFileSync(".ret.credentials"));
|
|
unlinkSync(".ret.credentials");
|
|
console.log(`Logged out of ${creds.host}.`);
|