DockerCLI/cli/config
Sebastiaan van Stijn 75ab44af6f
Fix ConfigFile.Save() replacing symlink with file
In situations where `~/.docker/config.json` was a symlink, saving
the file would replace the symlink with a file, instead of updating
the target file location;

    mkdir -p ~/.docker
    touch ~/real-config.json
    ln -s ~/real-config.json ~/.docker/config.json

    ls -la ~/.docker/config.json
    # lrwxrwxrwx 1 root root 22 Jun 23 12:34 /root/.docker/config.json -> /root/real-config.json

    docker login
    # Username: thajeztah
    # Password:

    # Login Succeeded

    ls -la ~/.docker/config.json
    -rw-r--r-- 1 root root 229 Jun 23 12:36 /root/.docker/config.json

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-16 11:35:41 +02:00
..
configfile Fix ConfigFile.Save() replacing symlink with file 2020-07-16 11:35:41 +02:00
credentials bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
types Remove docker api dependency from cli/config 2019-01-31 21:25:43 +00:00
config.go config: remove redundant os.Stat() 2020-06-15 11:08:56 +02:00
config_test.go Merge pull request #2599 from thaJeztah/ignore_empty_configfile 2020-07-09 15:27:29 +02:00