mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
fs 文件操作替换为 fs.promise
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Service, Inject } from 'typedi';
|
||||
import winston from 'winston';
|
||||
import config from '../config';
|
||||
import * as fs from 'fs';
|
||||
import * as fs from 'fs/promises';
|
||||
import {
|
||||
Env,
|
||||
EnvModel,
|
||||
@@ -208,6 +208,6 @@ export default class EnvService {
|
||||
}
|
||||
}
|
||||
}
|
||||
fs.writeFileSync(config.envFile, env_string);
|
||||
await fs.writeFile(config.envFile, env_string);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user