Skip to content

Commit 5d0778f

Browse files
committed
✨ Uses cwd as workspace for read-configuration
1 parent a5b0b34 commit 5d0778f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/spec-node/devContainersSpecCLI.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,9 +961,6 @@ function readConfigurationOptions(y: Argv) {
961961
if (idLabels?.some(idLabel => !/.+=.+/.test(idLabel))) {
962962
throw new Error('Unmatched argument format: id-label must match <name>=<value>');
963963
}
964-
if (!argv['container-id'] && !idLabels?.length && !argv['workspace-folder']) {
965-
throw new Error('Missing required argument: One of --container-id, --id-label or --workspace-folder is required.');
966-
}
967964
return true;
968965
});
969966
}
@@ -999,7 +996,7 @@ async function readConfiguration({
999996
};
1000997
let output: Log | undefined;
1001998
try {
1002-
const workspaceFolder = workspaceFolderArg ? path.resolve(process.cwd(), workspaceFolderArg) : undefined;
999+
const workspaceFolder = path.resolve(process.cwd(), workspaceFolderArg ?? '.');
10031000
const providedIdLabels = idLabel ? Array.isArray(idLabel) ? idLabel as string[] : [idLabel] : undefined;
10041001
const configFile = configParam ? URI.file(path.resolve(process.cwd(), configParam)) : undefined;
10051002
const overrideConfigFile = overrideConfig ? URI.file(path.resolve(process.cwd(), overrideConfig)) : undefined;

0 commit comments

Comments
 (0)