If TMPDIR environment variable is set, vscode integration does not accept commands
See original GitHub issueA random piece of software on my machine (Windows 10) had set this the system environment variable TMPDIR
, which caused the vscode integration to not accept commands. I believe this is because the function get_communication_dir_path()
uses gettempdir()
:
https://github.com/knausj85/knausj_talon/blob/main/apps/vscode/command_client/command_client.py#L211-L224
which checks TMPDIR
, TEMP
, and TMP
, in order, to choose a temporary directory.
On the extension side, node’s os.tmpdir()
is used to select a temporary directory:
https://github.com/pokey/command-server/blob/main/src/paths.ts#L4-L12
It’s not documented, but I believe this must not check the TMPDIR env variable, causing the two ends of the connection to choose different directories and miss each other.
(Not sure how to fix this. You could override the directory lookup, or just switch to using a socket lol.)
Issue Analytics
- State:
- Created a year ago
- Comments:16 (5 by maintainers)
Top GitHub Comments
I mildly prefer using the temporary directory. I’ve put my temp dir on an in-memory filesystem so that all this command client traffic doesn’t have to hit my hard drive at all.
FWIW there’s already platform-specific behaviour here: on *nix the UID is in the directory name, but not on Windows.