mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-14 08:08:34 +02:00
Don't Show undefined
This commit is contained in:
@@ -21,7 +21,8 @@ module.exports = class GenerateProcessEnvCommand extends Command {
|
|||||||
const list = data.split('\n').map(line => {
|
const list = data.split('\n').map(line => {
|
||||||
if (!line) return '';
|
if (!line) return '';
|
||||||
if (line.startsWith('#')) return line;
|
if (line.startsWith('#')) return line;
|
||||||
return `${line}"${process.env[line.replace('=', '')]}"`;
|
line = line.replace('=', '');
|
||||||
|
return `${line}="${process.env[line] || ''}"`;
|
||||||
}).join('\n');
|
}).join('\n');
|
||||||
return msg.channel.send({ files: [{ attachment: Buffer.from(list), name: 'provess.env.txt' }] });
|
return msg.channel.send({ files: [{ attachment: Buffer.from(list), name: 'provess.env.txt' }] });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user