-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(socket): use xdgBasedir.runtime instead of tmp #3304
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3304 +/- ##
==========================================
+ Coverage 58.95% 59.21% +0.26%
==========================================
Files 35 35
Lines 1703 1709 +6
Branches 374 379 +5
==========================================
+ Hits 1004 1012 +8
+ Misses 561 559 -2
Partials 138 138
Continue to review full report at Codecov.
|
8604498
to
8b4a577
Compare
f883ab0
to
acfd152
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🕺
3365791
to
4ec028a
Compare
dfe8b7d
to
dd8f709
Compare
752d19d
to
9c462c0
Compare
9c462c0
to
f1969bb
Compare
Moving to draft because I need to write more tests (new change decreases -0.15%). We want increases! |
0453e21
to
9af2112
Compare
return () => ({ | ||
data: "/home/envPath/.local/share", | ||
config: "/home/envPath/.config", | ||
temp: "/tmp/envPath/runtime", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For whatever reason, when I extract this object into a variable and pass in to the mock, it doesn't work 🤷♂️
jest.mock("xdg-basedir", () => ({ | ||
data: "/home/usr/.local/share", | ||
config: "/home/usr/.config", | ||
runtime: "/tmp/runtime", | ||
})) | ||
const getEnvPaths = require("../../../src/node/util").getEnvPaths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to do this because of: jestjs/jest#2582 (comment)
faf12cb
to
4da1388
Compare
4da1388
to
46fe77d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes this issue:
discarding socket connection: EACCES: permission denied, unlink '/tmp/code-server/tls-proxy'
by using the
xdgBasedir.runtime
path instead of/tmp/code-server/tls-proxy
.Changes
runtime
togetEnvPaths
getEnvPaths
tmpdir
insocket.ts
refactor: use paths.runtime in socket proxyPipe
Screenshots
Checklist
Fixes #2200