mujx / hakatime

Wakatime server implementation & analytics dashboard
https://hakatime.mtx-dev.xyz
The Unlicense
643 stars 49 forks source link

Non-unicode database names fail #18

Closed luckydonald closed 3 years ago

luckydonald commented 3 years ago

Apparently I can't use a database name like ﹍hakatime.

[2021-01-30 23:50:14][hakatime.server][Error][9b15e04cdb0a][PID 1][ThreadId 47][hakatime-0.1.0-inplace-libhaka:Haka.Errors src/Haka/Errors.hs:126:5]
OperationException "ConnectionError (Just \"FATAL:  database \\\"Mhakatime\\\" does not exist\\n\")"

It is correctly in the docker-inspect.

image click to display code ``` }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "HAKA_DB_HOST=postgres", "HAKA_DB_PORT=5432", "HAKA_DB_NAME=﹍hakatime", ```

exec-ing into the container and echoing that variable is shown correctly there too.

image click to display code ``` luckydonald$ d-c exec hakatime /bin/sh / # echo $HAKA_DB_NAME ﹍hakatime ```

The database was created successfully, and the sql files in /docker loaded.

image

Therefore this seems to be a problem with hakatime.

mujx commented 3 years ago

Thanks a lot for the bug report!