Skip to content
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

Validate devcontainer config file name #694

Closed
Tpuljak opened this issue Jun 19, 2024 · 5 comments · Fixed by #714
Closed

Validate devcontainer config file name #694

Tpuljak opened this issue Jun 19, 2024 · 5 comments · Fixed by #714
Labels
backlog backlog until further notice enhancement New feature or request

Comments

@Tpuljak
Copy link
Member

Tpuljak commented Jun 19, 2024

Is your feature request related to a problem? Please describe.
The Devcontainer CLI will fail if the config file is not named .devcontainer.json or devcontainer.json. Currently, our TUI allows for any path to be entered which will fail during the build process if the condition is not met.

Error: Filename must be devcontainer.json or .devcontainer.json

Describe the solution you'd like
We should implement input validation that would inform the user during the creation process that the filename must be named .devcontainer.json or devcontainer.json.

@Tpuljak Tpuljak added enhancement New feature or request backlog backlog until further notice labels Jun 19, 2024
@RS-labhub
Copy link
Contributor

I have a solution to fix this issue. In case, if the fileName != requiredName, do I need to send an error message?

I'll try to raise a PR soon, after figuring out which file I have to change 😃

@Tpuljak
Copy link
Member Author

Tpuljak commented Jun 26, 2024

do I need to send an error message?

@RS-labhub you need to use the validate function of the input to achieve this and the error will be displayed automatically.

@RS-labhub
Copy link
Contributor

Got it!

@RS-labhub
Copy link
Contributor

You can close this issue now

@Tpuljak Tpuljak closed this as completed Jun 28, 2024
@Tpuljak
Copy link
Member Author

Tpuljak commented Jun 28, 2024

@RS-labhub in the future, please add Closes #ISSUE_NUM in your PR description so it gets deleted automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog backlog until further notice enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants