-
Notifications
You must be signed in to change notification settings - Fork 5
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: use own, newly created directory #133
Conversation
dd8c7fe
to
da9f340
Compare
src/index.ts
Outdated
@@ -5,22 +5,33 @@ import path from 'node:path' | |||
import { findRelease } from './release' | |||
import { checkerName, version } from './shared' | |||
|
|||
const WORKING_DIR = path.join(process.env.HOME ?? "/tmp", 'editorconfig-checker') |
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.
Is there any reason to do not use /tmp by default?
Couldn't we use a temporary working directory? Something equivalent to mktemp -d
(shell) or os.TempDir
(Go) ?
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.
If we would like to use /tmp
, we should use os.tmpdir()
.
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‘ve used that as a fallback because the environment variable could be undefined. I doubt that it ever will be, but yeah, we should guard against it.
67bb068
to
79fe996
Compare
cc @rskmm0chang |
Co-authored-by: Théo LUDWIG <[email protected]>
79fe996
to
da5944d
Compare
I guess 72hours are over. |
I'm not entirely sure how to test this properly.
Closes #129