charludo / projectmgr.nvim

Quickly switch between projects and automate startup tasks.
https://github.com/charludo/projectmgr.nvim
GNU General Public License v3.0
121 stars 4 forks source link

Update project fails due to incorrect query. #10

Closed sagarc03 closed 2 years ago

sagarc03 commented 2 years ago

https://github.com/charludo/projectmgr.nvim/blob/3af871d362fa17bfe90c905c3585fea6cfb84de6/lua/projectmgr/db_adapter.lua#L179-L190

    local _ = db:exec(
        "UPDATE projects SET name='"
            .. name
            .. "', path='"
            .. path
            .. "', commandstart='"
            .. commandstart
            .. "', commandexit='" -- this 'commandexit=' is missing
            .. commandexit
            .. "' WHERE name=='"
            .. old_name
            .. "';"
    )
charludo commented 2 years ago

Gold catch, approved your PR. Thank you!

(I really need to get around to adding unit tests 😅)