Skip to content

0.17 fork tries to read database file as config file #55

@blaix

Description

@blaix

I've mostly been using the 0.17 fork with --quick-db so didn't notice until now that when I use the --db option I get a strange error about control characters in the config file:

FATAL | 2025/03/16 22:29:09 | in parsing config file: yaml: control characters are not allowed

This happens even if the config file does not exist.

It looks like the problem might be that it never replaces the extension with yaml before getting here:

ws4sqlite/src/cli.go

Lines 93 to 94 in 5c04e37

if utils.FileExists(yamlFile) {
cfgData, err := os.ReadFile(yamlFile)

I built my own version with an added line right before that to print out yamlFile and when I run with -db test.db it prints test.db.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions