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

affected/package: os #57472

Closed
merikan opened this issue Dec 27, 2022 · 1 comment
Closed

affected/package: os #57472

merikan opened this issue Dec 27, 2022 · 1 comment

Comments

@merikan
Copy link

merikan commented Dec 27, 2022

What version of Go are you using (go version)?

$ go version
go version go1.19.4 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/peter/Library/Caches/go-build"
GOENV="/Users/peter/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/peter/.local/share/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/peter/.local/share/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.19.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.19.4/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19.4"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/peter/src/github.com/RasmusLindroth/tut/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tt/4wtzxj3n1xgfrfkxm92db1mh0000gn/T/go-build50040484=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

When using the os#UserConfigDir on Macos (Darwin) in the terminal one would expect that the variable $XDG_CONFIG_HOME, if defined, is used but instead $HOME/Library/Application Support is always returned.

This behavior is probably the preferred way for desktop applications, but in a terminal application it gets very confusing when XDG_CONFIG_HOME is set and not used.

What did you expect to see?

The value of variable $XDG_CONFIG_HOME => /Users/peter/.config

What did you see instead?

/Users/peter/Library/Application Support

@seankhliao
Copy link
Member

see the original discussion on macos semantics: #29960

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2022
@golang golang locked and limited conversation to collaborators Dec 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants