mdouchement / standardfile

Yet Another Standardfile (standardnotes server) Implementation written in Golang
MIT License
80 stars 9 forks source link

keys cannot contain : character #59

Closed JadeVane closed 2 years ago

JadeVane commented 2 years ago

I downloaded the binary file from the release page, and run with the command below

./standardfile-linux-amd64 init -c standardfile.yml

the content of standardfile.yml was copied from here

# Address to bind
address: "localhost:5000"
# Disable registration
no_registration: false
# Database folder path; empty value means current directory
database_path: ""
# Secret key used for JWT authenthentication (before 004 and 20200115)
secret_key: jwt-development
# Session used for authentication (since 004 and 20200115)
session:
  secret: paseto-development
  access_token_ttl: 1440h # 60 days expressed in Golang's time.Duration format
  refresh_token_ttl: 8760h # 1 year

but get the error message

Error: (2, 1): parsing error: keys cannot contain : character
Usage:
  standardfile init [flags]

Flags:
  -c, --config string   Configuration file
  -h, --help            help for init

2021/09/04 09:50:37 (2, 1): parsing error: keys cannot contain : character

some infomation that may be helpful

go version: 1.17 linux/amd64 platform: ubuntu 20.04 kernel: 5.11.0-27-generic

JadeVane commented 2 years ago

fixed by running touch sf.db by hand and skip running init command

mdouchement commented 2 years ago

Thanks for the report. It's due to a bad parser format.