default file path if not empty

This commit is contained in:
bel
2023-10-15 10:39:58 -06:00
parent 46e62dc485
commit ed474b8c3a

View File

@@ -74,8 +74,8 @@ func _main() error {
} }
func getConfig() config { func getConfig() config {
defaultFilepath, ok := os.LookupEnv("PTTODO_FILE") defaultFilepath := os.Getenv("PTTODO_FILE")
if !ok { if defaultFilePath == "" {
defaultFilepath = "./todo.yaml" defaultFilepath = "./todo.yaml"
} }