-
Notifications
You must be signed in to change notification settings - Fork 222
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
obtuse and confusing error with local feature under WSL #834
Comments
Hi 👋
^ was an older and deprecated approach for using Feature (even before the concept of dev container Features). Hence, the error message seems correct given the prior context. However, I can understand how this might be confusing to you. Apologies for the inconvenience! We can update the error message as 👇 Let us know if that will be helpful, thanks
|
Yes, I presumed there was some history in that code. And that error message looks great! |
@prathameshzarkar9 / @gauravsaini04 Can either of you pick this up next? All it needs is an update to the logging & error message. See #834 (comment) |
Hi @samruddhikhandale , I have created a PR for this fix. Modified the confusing error message displayed to the user as recommended. |
* obtuse and confusing error with local feature under WSL #834 * addressed review comments and modified error message accordingly * review comments addressed and error message changed as needed * error message tab removed and variable moved to if condition
My mistake was putting "myfeature" inside devcontainer.json instead of "./myfeature". However the error message was horribly misleading.
To reproduce, create .devcontainer/myfeature/devcontainer-feature.json and add this to .devcontainer/devcontainer.json:
You will get this error:
After changing .devcontainer/devcontainer.json:
The error is gone:
Can we fix https://github.com/devcontainers/cli/blob/main/src/spec-configuration/containerFeaturesConfiguration.ts#L700 so the next poor schmuck that makes the same mistake I did doesn't waste hours tracking this down?
A simple "you forgot to prepend './' to your feature" would have really helped.
Or better yet, allow the WSL syntax with relative subdir without the leading './' would be nice!
The text was updated successfully, but these errors were encountered: