-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
aqua g -i
raises panic if packages
has only comments
#3200
Comments
Thank you for your report.
The panic occurs in the third party library goccy/go-yaml. |
This issue doesn't occur when I create aqua.yaml by $ aqua init
$ cat aqua.yaml
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
# checksum:
# enabled: true
# require_checksum: true
# supported_envs:
# - all
registries:
- type: standard
ref: v4.239.1 # renovate: depName=aquaproj/aqua-registry
packages:
$ aqua g -i # choose 1xyz/pryrite
$ cat aqua.yaml
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
# checksum:
# enabled: true
# require_checksum: true
# supported_envs:
# - all
registries:
- type: standard
ref: v4.239.1 # renovate: depName=aquaproj/aqua-registry
packages:
- name: 1xyz/pryrite@0.10.20 |
Yes that's what I meant, but I edited the comment. I wanted to link this one with the other two. |
Hmm. I couldn't reproduce the issue. $ aqua info
{
"version": "2.36.2",
"commit_hash": "716d9ac6f2de2beffe0db87caf418443155170ab",
"os": "darwin",
"arch": "arm64",
"pwd": "/Users/(USER)/Documents/test/aqua/3200",
"root_dir": "/Users/(USER)/.local/share/aquaproj-aqua",
"env": {
"AQUA_GLOBAL_CONFIG": ":/Users/(USER)/repos/src/github.com/aquaproj/aqua-registry/aqua-all.yaml",
"AQUA_PROGRESS_BAR": "true"
},
"config_files": [
{
"path": "/Users/(USER)/Documents/test/aqua/3200/aqua.yaml"
}
]
} Set up local registry and policy. $ cp ~/repos/src/github.com/aquaproj/aqua-registry/registry.yaml . # Copy registry.yaml from aqua-registry
$ cat aqua-policy.yaml
---
registries:
- name: local
type: local
path: registry.yaml
- type: standard
ref: semver(">= 3.0.0")
packages:
- registry: local # allow all packages in the Registry
- registry: standard
$ git init
$ aqua policy allow Run $ cat aqua.yaml
checksum:
supported_envs:
- linux
registries:
- type: local
name: local
path: registry.yaml
packages:
$ aqua g -i # choose 1xyz/pryrite
$ cat aqua.yaml
checksum:
supported_envs:
- linux
registries:
- type: local
name: local
path: registry.yaml
packages:
- name: 1xyz/pryrite@0.10.20
registry: local |
I checked again because I saw about your try with aqua.yaml ---
registries:
- type: local
name: local
path: registry.yaml
packages:
# |
btw |
📝 I thought maybe missing a newline at the end of file is related to this issue, so I removed it and tried again but I couldn't reproduce the issue. |
Could you open an issue for this? |
I see. I could reproduce the issue. Thank you. $ cat aqua.yaml
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
# checksum:
# enabled: true
# require_checksum: true
# supported_envs:
# - all
registries:
- type: standard
ref: v4.239.1 # renovate: depName=aquaproj/aqua-registry
packages:
# From the next time, could you use standard registry rather than local registry and github_content registry in the reproduction code if they are unnecessary to reproduce the issue? |
I think it's difficult to solve the issue by aqua. |
packages
fieldaqua g -i
raises panic if packages
has only comments
Regarding the schema comment, I opened #3202. Regarding the panic I can reproduce it with local registries and multiple empty lines at the end of the file, e.g.: ---
registries:
- type: local
name: local
path: $HOME/.config/aqua/registry.yaml
packages:
# 3 empty lines below
Sure, I will use the standard registry next time as an example. This is not blocking for me. Maybe the yaml library should solve this one and the other two issues. |
I guess this is the cause. |
aqua info
Overview
When running
aqua g -i
with an emptypackages
field, a panic occurs after a selection is done.How to reproduce
aqua.yaml
Executed command and output
Debug output
No response
Expected behaviour
I would expect the command to work normally, when the
packages
field is empty.Actual behaviour
A panic occurs.
Note
No response
The text was updated successfully, but these errors were encountered: