Shorten and improve output
This commit is contained in:
parent
8c06514337
commit
aa7c4f2bc1
7
tool.js
7
tool.js
|
@ -1,16 +1,15 @@
|
|||
const fs = require(`fs`);
|
||||
console.log(`Please note that this tool currently only supports one single file. It may be improved in the future.`);
|
||||
console.info(`Please note that this tool currently only supports one single file. It may be improved in the future.`);
|
||||
|
||||
if (process.argv.length === 3) {
|
||||
fs.readFile(process.argv[2], (error, data) => {
|
||||
if (error) console.error(error);
|
||||
else {
|
||||
console.log(`Paste the following code into the Raw Secrets Editor:\n`)
|
||||
console.log(JSON.stringify({
|
||||
console.log(`Paste the following code into the Raw Secrets Editor:\n\n`, JSON.stringify({
|
||||
code: data.toString(`base64`)
|
||||
}));
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log(`Usage: <infile.js>`);
|
||||
console.error(`Usage: <infile.js>`);
|
||||
}
|
Loading…
Reference in New Issue