mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Fix
This commit is contained in:
@@ -17,8 +17,8 @@ module.exports = class GenerateProcessEnvCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run(msg) {
|
run(msg) {
|
||||||
const data = fs.readFileSync(path.join(__dirname, '..', '..', '.env.example')).split('\n');
|
const data = fs.readFileSync(path.join(__dirname, '..', '..', '.env.example'), { encoding: 'utf8' });
|
||||||
const list = data.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('=', '')]}"`;
|
return `${line}"${process.env[line.replace('=', '')]}"`;
|
||||||
|
|||||||
Reference in New Issue
Block a user