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

Build missing yaml message #2995

Merged
merged 3 commits into from Feb 13, 2024

Conversation

kichristensen
Copy link
Contributor

@kichristensen kichristensen commented Feb 12, 2024

What does this change

Provides are more user-friendly error message when running porter build from a directory not containing porter.yaml.

Previously the error message looked like this:

$ porter build
unable to read manifest file : could not read the manifest at "": read ~/unclear-message: is a directory
unable to generate manifest: unable to read manifest file : could not read the manifest at "": read ~/unclear-message: is a directory

With this change it looks like this:

$ porter build
could not find porter.yaml in the current directory ~/unclear-message, make sure you are in the right directory or specify the porter manifest with --file

What issue does it fix

Closes #2926 and closes #2991

Notes for the reviewer

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our [Contributors][contributors] list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

Improve the error message when porter.yaml is missing during build

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Signed-off-by: Kim Christensen <kimworking@gmail.com>
Signed-off-by: Kim Christensen <kimworking@gmail.com>
@kichristensen
Copy link
Contributor Author

@schristoff Sorry about the failing tests, it has been fixed now

Copy link
Contributor

@schristoff schristoff left a comment

Choose a reason for hiding this comment

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

Thank you so much and congrats on your first contribution!!! 🎉💃

@schristoff schristoff merged commit 754ecdd into getporter:main Feb 13, 2024
15 checks passed
@kichristensen kichristensen deleted the buildMissingYamlMessage branch April 9, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants