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 --path flag when using wolfictl update #763

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willdollman
Copy link

@willdollman willdollman commented Apr 17, 2024

When the --path flag is used with wolfictl update, the user-provided PkgPath is not used when referencing the melange config file path in pkg/update/update.go.

This results in the update operations assuming that the config file that's being updated is in the root of the repository, rather than under the user-provided PkgPath.

I've set up a minimal repo to reproduce the issue, where melange config files sit in the wolfi-packages/ directory:

$ wolfictl update --dry-run --create-issues=false --path='wolfi-packages/' https://github.com/willdollman/melange-config-example

[...]

# wolfictl tries to update ./qdrant.yaml rather than ./wolfi-packages/qdrant.yaml

2024/04/17 11:08:41 INFO 2024/04/17 11:08:41 wolfictl update: qdrant: failed to bump package qdrant to version 1.8.4: open qdrant.yaml: no such file or directory

With the changes in this PR:

go run main.go update --create-issues=false --path='wolfi-packages/' https://github.com/willdollman/melange-config-example

[...]
# Update succeeds
2024/04/17 12:12:46 INFO 2024/04/17 12:12:46 wolfictl update: after bump: qdrant git status: On branch wolfictl-95b72f3f-a033-425a-8228-3f23073d07d6
[...]

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.

1 participant