command/operator_debug: mkdir before storing agent-host (#8707)

The api calls were reordered, the new order omits the
`agent-host.json` result by fetching it before the directory is
created.
This commit is contained in:
Lang Martin 2020-08-28 11:58:06 -04:00 committed by GitHub
parent eadb91e734
commit 97c7f2acea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -454,6 +454,7 @@ func (c *OperatorDebugCommand) collectAgentHost(path, id string, client *api.Cli
}
path = filepath.Join(path, id)
c.mkdir(path)
c.writeJSON(path, "agent-host.json", host, err)
}