Archived
1
0

Ensure all environment paths are created

This normally happens in electron-main/main.ts but we don't run anything
from there.

Fixes #499.
This commit is contained in:
Asher
2019-04-16 10:57:29 -05:00
parent aabb2ecda7
commit b8f222acf2
2 changed files with 14 additions and 18 deletions

View File

@ -1,6 +1,4 @@
import { ChildProcess } from "child_process";
import * as fs from "fs";
import * as fse from "fs-extra";
import * as os from "os";
import * as path from "path";
import { forkModule } from "./bootstrapFork";
@ -90,16 +88,6 @@ export class SharedProcess {
this.activeProcess.kill();
}
const backupsDir = path.join(this.userDataDir, "Backups");
await Promise.all([
fse.mkdirp(backupsDir),
]);
const workspacesFile = path.join(backupsDir, "workspaces.json");
if (!fs.existsSync(workspacesFile)) {
fs.appendFileSync(workspacesFile, "");
}
const activeProcess = forkModule("vs/code/electron-browser/sharedProcess/sharedProcessMain", [], {
env: {
VSCODE_ALLOW_IO: "true",