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

Recover system $TMPDIR for emacsclient #18243

Closed
wants to merge 0 commits into from
Closed

Conversation

tshu-w
Copy link
Contributor

@tshu-w tshu-w commented Sep 4, 2024

Try to fix: #17334,

I'm not sure if Etc.systmpdir is equal to TMPDIR, but it works for me.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@Bo98
Copy link
Member

Bo98 commented Sep 4, 2024

Seems ok but might not work if someone sets a custom TMPDIR, so a full fix might be to store the original TMPDIR somewhere like we do for PATH.

@tshu-w
Copy link
Contributor Author

tshu-w commented Sep 4, 2024

like we do for PATH.

Would you mind share the code about this?

By the way, @MikeMcQuaid asks me to modify only the Library/Homebrew/dev-cmd/edit.rb, in which case I cannot save the original TMPDIR.

@MikeMcQuaid
Copy link
Member

By the way, @MikeMcQuaid asks me to modify only the Library/Homebrew/dev-cmd/edit.rb, in which case I cannot save the original TMPDIR.

@tshu-w It's ok to have TMPDIR added to this list:

brew/bin/brew

Line 185 in 7683b22

# We don't want to take the user's value for, e.g., `HOMEBREW_PATH` here!

this will set HOMEBREW_TMPDIR which you can then use ENV["TMPDIR"] = ENV["HOMEBREW_TMPDIR"] or similar to set back in dev-cmd/edit.rb

@tshu-w
Copy link
Contributor Author

tshu-w commented Sep 5, 2024

As suggested by @Bo98 @MikeMcQuaid, I open a new #18260.

@MikeMcQuaid
Copy link
Member

@tshu-w Thanks! For future reference: feel free to just push (force pushing if necessary) to existing PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't find socket when using emacsclient as homebrew editor
3 participants