init
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { checkFileExists, AssistantConfig } from '@/module/assistant/index.ts';
|
||||
import { chalk } from '@/module/chalk.ts';
|
||||
@@ -40,5 +41,10 @@ export class AssistantInit extends AssistantConfig {
|
||||
});
|
||||
console.log(chalk.green('助手配置文件创建成功'));
|
||||
}
|
||||
const env = this.configPath?.envConfigPath;
|
||||
if (!checkFileExists(env, true)) {
|
||||
fs.writeFileSync(env, '# 环境配置文件\n');
|
||||
console.log(chalk.green('助手环境配置文件创建成功'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user