Skip to content
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

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

mstruebing
Copy link
Member

@mstruebing mstruebing commented Oct 9, 2024

I'm not entirely sure how to test this properly.

Closes #129

@mstruebing mstruebing added the bug Something isn't working label Oct 9, 2024
@mstruebing mstruebing self-assigned this Oct 9, 2024
@mstruebing mstruebing force-pushed the max/10-09-specific-dir branch from dd8c7fe to da9f340 Compare October 9, 2024 11:55
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')

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) ?

Copy link
Member

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().

https://nodejs.org/docs/latest/api/os.html#ostmpdir

Copy link
Member Author

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.

src/index.ts Outdated Show resolved Hide resolved
@mstruebing mstruebing force-pushed the max/10-09-specific-dir branch from 67bb068 to 79fe996 Compare October 9, 2024 12:32
@mstruebing
Copy link
Member Author

cc @rskmm0chang

@mstruebing mstruebing force-pushed the max/10-09-specific-dir branch from 79fe996 to da5944d Compare October 17, 2024 14:24
@mstruebing
Copy link
Member Author

I guess 72hours are over.

@mstruebing mstruebing merged commit d70765d into main Oct 17, 2024
3 checks passed
@mstruebing mstruebing deleted the max/10-09-specific-dir branch October 17, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does not work on self-hosted runner
4 participants