Skip to content

Commit f43c050

Browse files
committed
✨ Uses cwd as workspace for build
1 parent 231757e commit f43c050

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
@@ -497,7 +497,7 @@ function buildOptions(y: Argv) {
497497
'user-data-folder': { type: 'string', description: 'Host path to a directory that is intended to be persisted and share state between sessions.' },
498498
'docker-path': { type: 'string', description: 'Docker CLI path.' },
499499
'docker-compose-path': { type: 'string', description: 'Docker Compose CLI path.' },
500-
'workspace-folder': { type: 'string', required: true, description: 'Workspace folder path. The devcontainer.json will be looked up relative to this path.' },
500+
'workspace-folder': { type: 'string', description: 'Workspace folder path. The devcontainer.json will be looked up relative to this path.' },
501501
'config': { type: 'string', description: 'devcontainer.json path. The default is to use .devcontainer/devcontainer.json or, if that does not exist, .devcontainer.json in the workspace folder.' },
502502
'log-level': { choices: ['info' as 'info', 'debug' as 'debug', 'trace' as 'trace'], default: 'info' as 'info', description: 'Log level.' },
503503
'log-format': { choices: ['text' as 'text', 'json' as 'json'], default: 'text' as 'text', description: 'Log format.' },
@@ -564,7 +564,7 @@ async function doBuild({
564564
await Promise.all(disposables.map(d => d()));
565565
};
566566
try {
567-
const workspaceFolder = path.resolve(process.cwd(), workspaceFolderArg);
567+
const workspaceFolder = path.resolve(process.cwd(), workspaceFolderArg ?? '.');
568568
const configFile: URI | undefined = configParam ? URI.file(path.resolve(process.cwd(), configParam)) : undefined;
569569
const overrideConfigFile: URI | undefined = /* overrideConfig ? URI.file(path.resolve(process.cwd(), overrideConfig)) : */ undefined;
570570
const addCacheFroms = addCacheFrom ? (Array.isArray(addCacheFrom) ? addCacheFrom as string[] : [addCacheFrom]) : [];

0 commit comments

Comments
 (0)