diff --git a/src/node/util.ts b/src/node/util.ts index 6d2993e2cd01..ecd880716a5c 100644 --- a/src/node/util.ts +++ b/src/node/util.ts @@ -8,7 +8,7 @@ import * as os from "os" import * as path from "path" import safeCompare from "safe-compare" import * as util from "util" -import xdgBasedir from "xdg-basedir" +import { xdgConfig, xdgData, xdgRuntime } from "xdg-basedir" import { vsRootPath } from "./constants" export interface Paths { @@ -65,10 +65,10 @@ export function getEnvPaths(platform = process.platform): Paths { return { // envPaths uses native directories so force Darwin to use the XDG spec // to align with other CLI tools. - data: xdgBasedir.data ? append(xdgBasedir.data) : paths.data, - config: xdgBasedir.config ? append(xdgBasedir.config) : paths.config, + data: xdgData ? append(xdgData) : paths.data, + config: xdgConfig ? append(xdgConfig) : paths.config, // Fall back to temp if there is no runtime dir. - runtime: xdgBasedir.runtime ? append(xdgBasedir.runtime) : paths.temp, + runtime: xdgRuntime ? append(xdgRuntime) : paths.temp, } case "win32": return { @@ -82,7 +82,7 @@ export function getEnvPaths(platform = process.platform): Paths { data: paths.data, config: paths.config, // Fall back to temp if there is no runtime dir. - runtime: xdgBasedir.runtime ? append(xdgBasedir.runtime) : paths.temp, + runtime: xdgRuntime ? append(xdgRuntime) : paths.temp, } } }