yoheimuta/protolint

Can't read Unix domain socket as a file

AlexCannonball opened this issue · 0 comments

Hello,

This issue is related to #327

I've got some progress researching a way to pass a file to protolint w/o creating a temp file.

I use Node.js IPC connections (https://nodejs.org/docs/latest-v18.x/api/net.html#identifying-paths-for-ipc-connections) and it works fine on Windows.

Unfortunately when testing on WSL + Ubuntu 22 it doesn't work:

  • Node.js creates a Unix domain socket. It's displayed via ls:
    cannonball@DESKTOP:/run/user/1000$ ls -l /run/user/1000/
    total 0
    srwxr-xr-x 1 cannonball cannonball   0 Jan 28 23:35 foo.proto
    
  • I can read the text from the socket via shell with nc -U foo.proto.
  • When I attempt running protolint, it exits with status code 2:
    '2024/01/28 23:15:52 [INFO] protolint doesn't load a config file\nopen /run/user/1000/foo.proto: no such device or address\n'
    

Unlike Windows, I don't see any attempts to connect to the socket. Is protolint supposed to read from Unix domain sockets?