Move upgradesTmpDir out of helpers

This commit is contained in:
Koen Vlaswinkel
2023-06-12 15:31:32 +02:00
parent 61ac19f715
commit 1096ed8bf5
2 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,3 @@
import { ensureDirSync } from "fs-extra";
import { join } from "path";
import { dirSync } from "tmp-promise";
import { extLogger } from "./common";
@@ -9,8 +7,6 @@ export const tmpDir = dirSync({
keep: false,
unsafeCleanup: true,
});
export const upgradesTmpDir = join(tmpDir.name, "upgrades");
ensureDirSync(upgradesTmpDir);
export const tmpDirDisposal = {
dispose: () => {

View File

@@ -1,5 +1,5 @@
import * as tmp from "tmp-promise";
import { basename } from "path";
import { basename, join } from "path";
import { CancellationToken, Uri } from "vscode";
import { LSPErrorCodes, ResponseError } from "vscode-languageclient";
@@ -9,7 +9,7 @@ import {
DatabaseItem,
DatabaseResolver,
} from "../../databases/local-databases";
import { upgradesTmpDir } from "../../helpers";
import { tmpDir } from "../../helpers";
import { ProgressCallback } from "../../common/vscode/progress";
import { QueryMetadata } from "../../pure/interface-types";
import { extLogger, Logger } from "../../common";
@@ -26,6 +26,10 @@ import {
showAndLogExceptionWithTelemetry,
showAndLogWarningMessage,
} from "../../common/vscode/log";
import { ensureDirSync } from "fs-extra";
const upgradesTmpDir = join(tmpDir.name, "upgrades");
ensureDirSync(upgradesTmpDir);
export async function compileQuery(
qs: qsClient.QueryServerClient,