nixpkgs/pkgs/servers/caddy/xcaddy/use_tmpdir_on_darwin.diff
Theodore Ni 7a23457bac
xcaddy: use temp dir on Darwin
Upstream xcaddy uses the $HOME directory as the temp directory on Darwin
in order to fix an interesting bug.

In order to find version information for Caddy, it runs a command that
needs to operate on file system without "noexec" set, but Darwin's temp
directory has it set.

We can tolerate losing version information, since the alternative is
that xcaddy does not run on Darwin.
2022-09-19 00:06:14 -07:00

13 lines
580 B
Diff

diff --git a/builder.go b/builder.go
index ed6c5ef..36e8055 100644
--- a/builder.go
+++ b/builder.go
@@ -200,7 +200,7 @@ func NewReplace(old, new string) Replace {
// It is the caller's responsibility to remove the folder when finished.
func newTempFolder() (string, error) {
var parentDir string
- if runtime.GOOS == "darwin" {
+ if false && runtime.GOOS == "darwin" {
// After upgrading to macOS High Sierra, Caddy builds mysteriously
// started missing the embedded version information that -ldflags
// was supposed to produce. But it only happened on macOS after