cursorless-dev / cursorless

Don't let the cursor slow you down
https://www.cursorless.org/
MIT License
1.09k stars 77 forks source link

neovim: The show logs task can currently fail when it shouldn't #2445

Open fidgetingbits opened 1 week ago

fidgetingbits commented 1 week ago

atm the show logs task is:

    {
      "label": "Neovim: Show logs",
      "type": "process",
      "command": "tail",
      "args": [
        "-f",
        "${workspaceFolder}/packages/cursorless-neovim/out/nvim_node.log"
      ]
    },

I get an error from that task if I don't first touch that file:

 *  Executing task in folder fidgetingbits-cursorless: tail -f /home/aa/dev/talon/fidgetingbits-cursorless/packages/cursorless-neovim/out/nvim_node.log 

/usr/bin/tail: cannot open '/home/aa/dev/talon/fidgetingbits-cursorless/packages/cursorless-neovim/out/nvim_node.log' for reading: No such file or directory
/usr/bin/tail: no files remaining

 *  The terminal process "tail '-f', '/home/aa/dev/talon/fidgetingbits-cursorless/packages/cursorless-neovim/out/nvim_node.log'" failed to launch (exit code: 1). 
 *  Terminal will be reused by tasks, press any key to close it. 

Normally the way you would fix that would be to use tail -F which works on osx/linux, but I seem to get the same error in this case anyway. The other solution is be to touch the file first, but touch is not a windows command either. So probably have to chain some tasks together and make OS dependent versions

I think this only manifests because of another bug that I'll file, but still worth fixing.