-
Notifications
You must be signed in to change notification settings - Fork 366
DevContainer commands now default the workspace folder to the current directory if not specified. #1104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
chrmarti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks! Left a few comments.
| jsonOutput = JSON.parse(result.stdout.trim()); | ||
| } catch (parseError) { | ||
| // If direct parsing fails, try extracting JSON from mixed output | ||
| const lines = result.stdout.split('\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a bug in the output. Let's not block on this, something to look into in the future.
| .options({ | ||
| 'log-level': { choices: ['error' as 'error', 'info' as 'info', 'debug' as 'debug', 'trace' as 'trace'], default: 'error' as 'error', description: 'Log level.' }, | ||
| 'workspace-folder': { type: 'string', description: 'Workspace folder to use for the configuration.', demandOption: true }, | ||
| 'workspace-folder': { type: 'string', description: 'Workspace folder to use for the configuration.If --workspace-folder is not provided, this defaults to the current directory' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'workspace-folder': { type: 'string', description: 'Workspace folder to use for the configuration.If --workspace-folder is not provided, this defaults to the current directory' }, | |
| 'workspace-folder': { type: 'string', description: 'Workspace folder to use for the configuration. If --workspace-folder is not provided, this defaults to the current directory' }, |
Fixes: #1069
Issue summary:
This PR enhances the user experience by automatically defaulting the [--workspace-folder] parameter to the current working directory when it is not explicitly specified. The following DevContainer CLI commands will now use the current working directory as the default workspace folder if [--workspace-folder] is omitted:
Test cases is implemented for all these commands