Skip to content

Commit cdd73d8

Browse files
committed
✨ Uses cwd as workspace in run-user-commands
1 parent 5751450 commit cdd73d8

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
@@ -774,9 +774,6 @@ function runUserCommandsOptions(y: Argv) {
774774
if (remoteEnvs?.some(remoteEnv => !/.+=.*/.test(remoteEnv))) {
775775
throw new Error('Unmatched argument format: remote-env must match <name>=<value>');
776776
}
777-
if (!argv['container-id'] && !idLabels?.length && !argv['workspace-folder']) {
778-
throw new Error('Missing required argument: One of --container-id, --id-label or --workspace-folder is required.');
779-
}
780777
return true;
781778
});
782779
}
@@ -830,7 +827,7 @@ async function doRunUserCommands({
830827
await Promise.all(disposables.map(d => d()));
831828
};
832829
try {
833-
const workspaceFolder = workspaceFolderArg ? path.resolve(process.cwd(), workspaceFolderArg) : undefined;
830+
const workspaceFolder = path.resolve(process.cwd(), workspaceFolderArg ?? '.');
834831
const providedIdLabels = idLabel ? Array.isArray(idLabel) ? idLabel as string[] : [idLabel] : undefined;
835832
const addRemoteEnvs = addRemoteEnv ? (Array.isArray(addRemoteEnv) ? addRemoteEnv as string[] : [addRemoteEnv]) : [];
836833
const configFile = configParam ? URI.file(path.resolve(process.cwd(), configParam)) : undefined;

0 commit comments

Comments
 (0)