Commit c47dea1
committed
Graceful relative paths in CLI and config file
Before this, `dest` was always relative to CWD even when set from config
file, and if a config file was defined, `theme` was always relative to
it even when set via CLI.
Now for all CLI-passed environment properties, a "friend" `*Cli` prperty
is set to `true` (`themeCli`, `destCli`), so the environment loader can
determine whether it's relative to CWD or config file.
Also paths are now stored absolute, but are always displayed relative to
the CWD for coherent CLI output. If you set `theme: ../../theme` in
`foo/config.yml`, the displayed theme in CLI output will be `../theme`.
This fixes #362.1 parent 339f39b commit c47dea1
3 files changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
138 | 145 | | |
139 | 146 | | |
140 | 147 | | |
| |||
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
190 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
191 | 201 | | |
192 | 202 | | |
193 | 203 | | |
| |||
289 | 299 | | |
290 | 300 | | |
291 | 301 | | |
| 302 | + | |
| 303 | + | |
292 | 304 | | |
293 | 305 | | |
294 | | - | |
295 | | - | |
| 306 | + | |
| 307 | + | |
296 | 308 | | |
297 | 309 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | 331 | | |
333 | 332 | | |
334 | 333 | | |
| |||
0 commit comments