Skip to content

Commit 4290dbd

Browse files
committed
fixup! change type to string array
1 parent 6835d2d commit 4290dbd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/node/util.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import * as path from "path"
1010
import safeCompare from "safe-compare"
1111
import * as util from "util"
1212
import xdgBasedir from "xdg-basedir"
13+
import { getFirstString } from "../common/util"
1314

1415
export interface Paths {
1516
data: string
@@ -457,9 +458,9 @@ enum CharCode {
457458
* Taken from vs/base/common/uri.ts. It's not imported to avoid also importing
458459
* everything that file imports.
459460
*/
460-
export function pathToFsPath(path: string, keepDriveLetterCasing = false): string {
461+
export function pathToFsPath(path: string | string[], keepDriveLetterCasing = false): string {
461462
const isWindows = process.platform === "win32"
462-
const uri = { authority: undefined, path, scheme: "file" }
463+
const uri = { authority: undefined, path: getFirstString(path), scheme: "file" }
463464
let value: string
464465

465466
if (typeof uri.path !== "string") {

0 commit comments

Comments
 (0)