Add option to print machine creds (#1149)
* Add option to print machine creds Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
This commit is contained in:
parent
a6e405422c
commit
c109e0e7dd
|
@ -256,7 +256,7 @@ cscli machines add MyTestMachine --password MyPassword
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("unable to marshal api credentials: %s", err)
|
log.Fatalf("unable to marshal api credentials: %s", err)
|
||||||
}
|
}
|
||||||
if dumpFile != "" {
|
if dumpFile != "" && dumpFile != "-" {
|
||||||
err = ioutil.WriteFile(dumpFile, apiConfigDump, 0644)
|
err = ioutil.WriteFile(dumpFile, apiConfigDump, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("write api credentials in '%s' failed: %s", dumpFile, err)
|
log.Fatalf("write api credentials in '%s' failed: %s", dumpFile, err)
|
||||||
|
|
Loading…
Reference in a new issue