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

[cmd] kamel run github|http|... fails on windows machine #2475

Closed
squakez opened this issue Jul 1, 2021 · 1 comment · Fixed by #2477
Closed

[cmd] kamel run github|http|... fails on windows machine #2475

squakez opened this issue Jul 1, 2021 · 1 comment · Fixed by #2477

Comments

@squakez
Copy link
Contributor

squakez commented Jul 1, 2021

Executing kamel.exe run github:apache/camel-k/e2e/common/files/Java.java on a windows machine will fail with following error:

Error: cannot read sources: cannot read sources: file system error while looking for github:apache/camel-k/e2e/common/files/Java.java: CreateFile github:apache/camel-k/e2e/common/files/Java.java: The filename, directory name, or volume label syntax is incorrect.

This is caused by the fact that we don't distinguish a generic URI with a scheme and a file. On Linux os it does not report as an error as we assume a file not found, but on windows, the golang libraries will report an error as they expect a file path starting with a single letter drive (ie, c:, d:), assuming github: to be the name of the drive.

@squakez
Copy link
Contributor Author

squakez commented Jul 1, 2021

I am already working on the fix

squakez added a commit to squakez/camel-k that referenced this issue Jul 1, 2021
Introduced a check to verify if the source matches with a supported scheme.

Closes apache#2475
nicolaferraro pushed a commit that referenced this issue Jul 2, 2021
Introduced a check to verify if the source matches with a supported scheme.

Closes #2475
squakez added a commit to squakez/camel-k that referenced this issue Jul 2, 2021
Introduced a check to verify if the source matches with a supported scheme.

Closes apache#2475
squakez added a commit to jboss-fuse/camel-k that referenced this issue Jul 2, 2021
Introduced a check to verify if the source matches with a supported scheme.

Closes apache#2475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant