Merge remote-tracking branch 'origin/master'

This commit is contained in:
muwoo
2022-02-18 11:43:45 +08:00
4 changed files with 17 additions and 3 deletions

View File

@@ -1,7 +1,14 @@
import path from "path";
import fs from "fs";
export default (): string => {
let localDataFile: any = process.env.HOME;
if (!localDataFile) {
localDataFile = process.env.LOCALAPPDATA;
}
return localDataFile;
const rubickPath = path.join(localDataFile, "rubick")
if (!fs.existsSync(rubickPath)) {
fs.mkdirSync(rubickPath);
}
return rubickPath;
};