Skip to content

Commit 352ddba

Browse files
committed
✨ Uses CWD as workspace for exec
1 parent 28fc47f commit 352ddba

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
@@ -1226,9 +1226,6 @@ function execOptions(y: Argv) {
12261226
if (remoteEnvs?.some(remoteEnv => !/.+=.*/.test(remoteEnv))) {
12271227
throw new Error('Unmatched argument format: remote-env must match <name>=<value>');
12281228
}
1229-
if (!argv['container-id'] && !idLabels?.length && !argv['workspace-folder']) {
1230-
throw new Error('Missing required argument: One of --container-id, --id-label or --workspace-folder is required.');
1231-
}
12321229
return true;
12331230
});
12341231
}
@@ -1276,7 +1273,7 @@ export async function doExec({
12761273
let output: Log | undefined;
12771274
const isTTY = process.stdin.isTTY && process.stdout.isTTY || logFormat === 'json'; // If stdin or stdout is a pipe, we don't want to use a PTY.
12781275
try {
1279-
const workspaceFolder = workspaceFolderArg ? path.resolve(process.cwd(), workspaceFolderArg) : undefined;
1276+
const workspaceFolder = path.resolve(process.cwd(), workspaceFolderArg ?? '.');
12801277
const providedIdLabels = idLabel ? Array.isArray(idLabel) ? idLabel as string[] : [idLabel] : undefined;
12811278
const addRemoteEnvs = addRemoteEnv ? (Array.isArray(addRemoteEnv) ? addRemoteEnv as string[] : [addRemoteEnv]) : [];
12821279
const configFile = configParam ? URI.file(path.resolve(process.cwd(), configParam)) : undefined;

0 commit comments

Comments
 (0)