Commit 41999e7
Tweak output of troubleshoot command when the CLI is unconfigured (#675)
* Pass full configuration value to troubleshooting status
Instead of passing just the viper config, which could be empty,
pass the full config.Configuration value, which has access to defaults.
This will let us give better debugging output.
* Fix output for 'home' in troubleshoot command
The home directory is never written to the viper config, we get it from the environment,
which is stored in the config.Configuration value.
* Output default workspace in troubleshoot if unconfigured
Rather than providing an empty string for the workspace in the
troubleshoot command when the CLI is unconfigured, this now says
Workspace: /the/actual/path (default)
* Use config dir, not file, in troubleshoot command
In the old CLI we had a single config file. Now we potentially have several.
They will all live in the config directory.
The troubleshoot command now outputs the directory instead of the file.
If the troubleshoot command is unconfigured, this would previously have
given an empty string for the config file. Now it will always print the
default config directory, unless the user has specifically defined
an override using environment variables.
* Inline token in troubleshoot config status
It was unnecessary to have an additional local variable.
* Use proper helper method for settings URL in troubleshoot command
The config package has logic for the settings URL, we shouldn't be hard-coding it here.
* Fix ping when troubleshoot is unconfigured1 parent 37f0507 commit 41999e7
1 file changed
Lines changed: 29 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| 66 | + | |
64 | 67 | | |
65 | | - | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | | - | |
| 104 | + | |
103 | 105 | | |
104 | | - | |
105 | | - | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
115 | | - | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
131 | 137 | | |
132 | 138 | | |
133 | 139 | | |
| |||
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
175 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
176 | 188 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
182 | 194 | | |
183 | | - | |
184 | | - | |
| 195 | + | |
| 196 | + | |
185 | 197 | | |
186 | 198 | | |
187 | 199 | | |
| |||
235 | 247 | | |
236 | 248 | | |
237 | 249 | | |
238 | | - | |
| 250 | + | |
239 | 251 | | |
240 | 252 | | |
241 | 253 | | |
| |||
0 commit comments