Skip to content

Commit

Permalink
Recover system $TMPDIR for emacsclient
Browse files Browse the repository at this point in the history
  • Loading branch information
tshu-w committed Sep 4, 2024
1 parent 3dda877 commit 185b405
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Library/Homebrew/dev-cmd/edit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# frozen_string_literal: true

require "abstract_command"
require "etc"
require "formula"

module Homebrew
Expand Down Expand Up @@ -29,6 +30,9 @@ class Edit < AbstractCommand
def run
ENV["COLORTERM"] = ENV.fetch("HOMEBREW_COLORTERM", nil)

# Recover system $TMPDIR for emacsclient
ENV["TMPDIR"] = Etc.systmpdir.freeze

unless (HOMEBREW_REPOSITORY/".git").directory?
odie <<~EOS
Changes will be lost!
Expand Down

0 comments on commit 185b405

Please sign in to comment.