This feature would enable greater flexibility and convenience, especially in scenarios where:
The devcontainer.json is shared across multiple projects.
Users want to maintain a centralized location for their dev container configurations.
Proposed solution
Enhance the gh cs create --devcontainer-path command to accept a path to a devcontainer.json file located outside of the repository directory. This could involve:
Path Validation: Ensure the specified path is valid and points to a proper devcontainer.json file.
Describe the feature or problem you’d like to solve
Currently, the
gh cs create --devcontainer-path
command is designed to work with devcontainer.json files that are located within the repository(https://github.com/cli/cli/blob/0f2e1ed9d19f73d20eb0dd124f4b5cba3111f2e9/pkg/cmd/codespace/create.go#L229). However, there are use cases where it would be beneficial to support devcontainer.json files located outside of the repository directory.This feature would enable greater flexibility and convenience, especially in scenarios where:
Proposed solution
Enhance the
gh cs create --devcontainer-path
command to accept a path to a devcontainer.json file located outside of the repository directory. This could involve:How will it benefit CLI and its users?