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

Feature request: add support for YML file extension for stacks, pkgmanagers #371

Closed
kbdharun opened this issue Jun 25, 2024 · 1 comment · Fixed by #373
Closed

Feature request: add support for YML file extension for stacks, pkgmanagers #371

kbdharun opened this issue Jun 25, 2024 · 1 comment · Fixed by #373
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kbdharun
Copy link
Member

kbdharun commented Jun 25, 2024

All stacks and pkgmanagers should have the YAML file extension to be detected by Apx currently (since it's hardcoded in some places). And when YML is used instead they aren't detected by default (Note: import seems to convert YML file to YAML file).

It would be great if stacks and package managers could detect configs with both YAML and YML file extensions when placed in the local directory (to avoid confusion on the user side).

Sample reference

apx/core/pkgManager.go

Lines 72 to 78 in 36ef027

func LoadPkgManager(name string) (*PkgManager, error) {
pkgManager, err := loadPkgManagerFromPath(filepath.Join(apx.Cnf.UserPkgManagersPath, name+".yaml"))
if err != nil {
pkgManager, err = loadPkgManagerFromPath(filepath.Join(apx.Cnf.PkgManagersPath, name+".yaml"))
}
return pkgManager, err
}

For full list checkout https://github.com/search?q=repo%3AVanilla-OS%2Fapx+.yaml&type=code

@kbdharun kbdharun added enhancement New feature or request good first issue Good for newcomers labels Jun 25, 2024
@deepu9
Copy link
Contributor

deepu9 commented Jun 29, 2024

@kbdharun can I work on it. Thanks.

deepu9 added a commit to deepu9/apx that referenced this issue Jul 2, 2024
…nagers

Added util function to choose either YAML or YML file depeneds on
availability. Updated all the references in stack and pkgManager files with util function.
deepu9 added a commit to deepu9/apx that referenced this issue Jul 4, 2024
…gers

Updated the util function name to SelectYamlFile.
mirkobrombin pushed a commit that referenced this issue Jul 13, 2024
Added util function to choose either YAML or YML file depeneds on
availability. Updated all the references in stack and pkgManager files with util function.
mirkobrombin pushed a commit that referenced this issue Jul 13, 2024
Updated the util function name to SelectYamlFile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants