mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/ctrld: correct write default config condition when start
!76 was merged without rebasing on latest master, so it missed the condition of "--cd" when checking for writing default config.
This commit is contained in:
committed by
Cuong Manh Le
parent
8e91123dbf
commit
6edd42629e
@@ -162,7 +162,9 @@ func initCLI() {
|
||||
// WorkingDirectory is not supported on Windows.
|
||||
cfg.WorkingDirectory = dir
|
||||
// No config path, generating config in HOME directory.
|
||||
if configPath == "" && !isNoConfigStart(cmd) && configBase64 == "" {
|
||||
noConfigStart := isNoConfigStart(cmd) && cdUID != ""
|
||||
writeDefaultConfig := !noConfigStart && configBase64 == "" && cdUID == ""
|
||||
if configPath == "" && writeDefaultConfig {
|
||||
defaultConfigFile = filepath.Join(dir, defaultConfigFile)
|
||||
readConfigFile(true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user