mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 10:38:33 -04:00
refactor: Fixed cli command.
This commit is contained in:
@@ -17,18 +17,22 @@ cmd_backup :: proc(cmd: ^Command) {
|
||||
|
||||
file, ok := new_env_file(path)
|
||||
if !ok {
|
||||
// TODO: log a message
|
||||
return
|
||||
}
|
||||
|
||||
db, db_ok := db_open()
|
||||
if !db_ok {
|
||||
// TODO: log a message
|
||||
return
|
||||
}
|
||||
defer db_close(&db)
|
||||
|
||||
if !db_insert(&db, file) {
|
||||
// TODO: log a message
|
||||
return
|
||||
}
|
||||
|
||||
fmt.printf("Saved %s into the database\n", path)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user