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

fix(cli): check run sources exists #1913

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

squakez
Copy link
Contributor

@squakez squakez commented Jan 15, 2021

  • Changed the name of run.isLocal func to run.isLocalAndExists as the function does both things
  • Added a default switch case to report either the file doesn't exist or the URI scheme cannot be parsed
  • Added some unit test to verify error messages expected

Fixes #1911

$ ./kamel run ../camel-k-samples/hello.groovy  dsadsa
Error: cannot read sources: cannot read sources: Missing file or unsupported scheme in dsadsa

Release Note

fix(cli): check run sources exists

* Changed the name of run.isLocal func to run.isLocalAndExists as the function does both things
* Added a default switch case to report either the file doesn't exist or the URI scheme cannot be parsed
* Added some unit test to verify error messages expected

Fixes apache#1911
Copy link
Member

@nicolaferraro nicolaferraro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@nicolaferraro nicolaferraro merged commit aaeb457 into apache:master Jan 15, 2021
@nicolaferraro nicolaferraro mentioned this pull request Feb 1, 2021
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 this pull request may close these issues.

[CLI] Kamel run does not check source file exists
3 participants