Skip to content

Commit 7a3282a

Browse files
committed
Type 'undefined' is not assignable to type 'string'.
1 parent f542ed9 commit 7a3282a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/spec-node/devContainersSpecCLI.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ async function doBuild({
580580
await Promise.all(disposables.map(d => d()));
581581
};
582582
try {
583-
const workspaceFolder = path.resolve(process.cwd(), workspaceFolderArg);
583+
const workspaceFolder = workspaceFolderArg ? path.resolve(process.cwd(), workspaceFolderArg) : process.cwd();
584584
const configFile: URI | undefined = configParam ? URI.file(path.resolve(process.cwd(), configParam)) : undefined;
585585
const overrideConfigFile: URI | undefined = /* overrideConfig ? URI.file(path.resolve(process.cwd(), overrideConfig)) : */ undefined;
586586
const addCacheFroms = addCacheFrom ? (Array.isArray(addCacheFrom) ? addCacheFrom as string[] : [addCacheFrom]) : [];
@@ -1151,7 +1151,7 @@ async function outdated({
11511151
};
11521152
let output: Log | undefined;
11531153
try {
1154-
const workspaceFolder = path.resolve(process.cwd(), workspaceFolderArg);
1154+
const workspaceFolder = workspaceFolderArg ? path.resolve(process.cwd(), workspaceFolderArg) : process.cwd();
11551155
const configFile = configParam ? URI.file(path.resolve(process.cwd(), configParam)) : undefined;
11561156
const cliHost = await getCLIHost(workspaceFolder, loadNativeModule, logFormat === 'text');
11571157
const extensionPath = path.join(__dirname, '..', '..');

0 commit comments

Comments
 (0)