mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
add a copyright notice with original author
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
b847c7f5a4
commit
0d905a896d
@ -21,6 +21,10 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Based on https://github.com/adrg/xdg
|
||||||
|
// Licensed under MIT License (MIT)
|
||||||
|
// Copyright (c) 2014 Adrian-George Bostan <adrg@epistack.com>
|
||||||
|
|
||||||
func osDependentRunDir() (string, error) {
|
func osDependentRunDir() (string, error) {
|
||||||
home, err := os.UserHomeDir()
|
home, err := os.UserHomeDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -24,10 +24,14 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Based on https://github.com/adrg/xdg
|
||||||
|
// Licensed under MIT License (MIT)
|
||||||
|
// Copyright (c) 2014 Adrian-George Bostan <adrg@epistack.com>
|
||||||
|
|
||||||
func osDependentRunDir() (string, error) {
|
func osDependentRunDir() (string, error) {
|
||||||
run := filepath.Join("run", "user", strconv.Itoa(os.Getuid()))
|
run := filepath.Join("run", "user", strconv.Itoa(os.Getuid()))
|
||||||
if _, err := os.Stat(run); err == nil {
|
if _, err := os.Stat(run); err == nil {
|
||||||
return run
|
return run, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// /run/user/$uid is set by pam_systemd, but might not be present, especially in containerized environments
|
// /run/user/$uid is set by pam_systemd, but might not be present, especially in containerized environments
|
||||||
|
@ -23,6 +23,10 @@ import (
|
|||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Based on https://github.com/adrg/xdg
|
||||||
|
// Licensed under MIT License (MIT)
|
||||||
|
// Copyright (c) 2014 Adrian-George Bostan <adrg@epistack.com>
|
||||||
|
|
||||||
func osDependentRunDir() (string, error) {
|
func osDependentRunDir() (string, error) {
|
||||||
flags := []uint32{windows.KF_FLAG_DEFAULT, windows.KF_FLAG_DEFAULT_PATH}
|
flags := []uint32{windows.KF_FLAG_DEFAULT, windows.KF_FLAG_DEFAULT_PATH}
|
||||||
for _, flag := range flags {
|
for _, flag := range flags {
|
||||||
|
@ -21,6 +21,10 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Based on https://github.com/adrg/xdg
|
||||||
|
// Licensed under MIT License (MIT)
|
||||||
|
// Copyright (c) 2014 Adrian-George Bostan <adrg@epistack.com>
|
||||||
|
|
||||||
func osDependentCacheDir() (string, error) {
|
func osDependentCacheDir() (string, error) {
|
||||||
home, err := os.UserHomeDir()
|
home, err := os.UserHomeDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -23,6 +23,10 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Based on https://github.com/adrg/xdg
|
||||||
|
// Licensed under MIT License (MIT)
|
||||||
|
// Copyright (c) 2014 Adrian-George Bostan <adrg@epistack.com>
|
||||||
|
|
||||||
func osDependentCacheDir() (string, error) {
|
func osDependentCacheDir() (string, error) {
|
||||||
home, err := os.UserHomeDir()
|
home, err := os.UserHomeDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -23,6 +23,10 @@ import (
|
|||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Based on https://github.com/adrg/xdg
|
||||||
|
// Licensed under MIT License (MIT)
|
||||||
|
// Copyright (c) 2014 Adrian-George Bostan <adrg@epistack.com>
|
||||||
|
|
||||||
func osDependentCacheDir() (string, error) {
|
func osDependentCacheDir() (string, error) {
|
||||||
flags := []uint32{windows.KF_FLAG_DEFAULT, windows.KF_FLAG_DEFAULT_PATH}
|
flags := []uint32{windows.KF_FLAG_DEFAULT, windows.KF_FLAG_DEFAULT_PATH}
|
||||||
for _, flag := range flags {
|
for _, flag := range flags {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user