miversen33 / netman.nvim

Neovim (Lua powered) Network Resource Manager
MIT License
338 stars 1 forks source link

Neo-tree integration explodes on invalid read of remote location #137

Closed miversen33 closed 1 year ago

miversen33 commented 1 year ago

Today I had the fun experience of my work VPN dying while trying to connect to a remote server over ssh. In that process, netman fails to read the ssh server I told it to and properly tosses an error (though maybe not the best one)

Unable to read ssh://$SERVERNAME///, received error / doesn't exist

This is good! However, it looks like something is mildly broken with how we integrate those "results" into Neo-tree as immediately after this error, we get the following failure

E5108: Error executing lua: ...re/nvim/lazy/netman.nvim/lua/netman/ui/neo-tree/init.lua:1017: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        ...re/nvim/lazy/netman.nvim/lua/netman/ui/neo-tree/init.lua:1017: in function 'navigate'
        ...vim/lazy/netman.nvim/lua/netman/ui/neo-tree/commands.lua:14: in function 'func'
        ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:782: in function <...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:780>

We need better nil handling on results within our Neo-tree integration it seems

miversen33 commented 1 year ago

I'm not sure which commit this was resolved in, but it has been addressed in the #143