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

yaml validation errors are not helpful if the file is empty #2071

Open
PietroPasotti opened this issue Jan 10, 2025 · 0 comments
Open

yaml validation errors are not helpful if the file is empty #2071

PietroPasotti opened this issue Jan 10, 2025 · 0 comments
Labels
Bug Something isn't working

Comments

@PietroPasotti
Copy link

PietroPasotti commented Jan 10, 2025

Bug Description

validation error is not helpful on an empty file.
(it was actually hard to find out that the file was empty because I thought I'd deleted it). The project already had a (valid) charmcraft.yaml next to it, and couldn't figure out why charmcraft wasn't liking it.

To Reproduce

charmcraft pack

Environment

charmcraft 3.2.2

metadata.yaml

# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.

Relevant log output

❯ charmcraft pack                                                                                                                                                                                                                                                                                                                          
Invalid file: 'metadata.yaml'                                                                                                                                                                                                                                                                                                                  
Recommended resolution: Ensure metadata.yaml meets the juju metadata.yaml specification.                                                                                                                                                                                                                                                       
For more information, check out: https://juju.is/docs/sdk/metadata-yaml                                                                                                                                                                                                                                                                        
Full execution log: '/home/pietro/.local/state/charmcraft/log/charmcraft-20250110-134846.839621.log'
@PietroPasotti PietroPasotti added the Bug Something isn't working label Jan 10, 2025
@PietroPasotti PietroPasotti changed the title charmcraft.yaml validation errors are not helpful yaml validation errors are not helpful if the file is empty Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant