Commit c8f9efb
authored
Enhance lib install from git url and zip file (#1145)
Previously installing from a zip file would extract the content directly
into the user library folder, this could have caused problem if the zip
file wasn't structured correctly.
To handle this we now extract to a temp directory to verify that the zip
is structured correctly and to infer the name of the library being
installed. If everything is fine we then copy it over to the user
library folder to finalize the installation.
Installing from a git repository has been enhanced too, after
cloning the repository to the user library folder we delete the .git
folder to make it a plain folder. Cloning should be faster too since we
now clone using depth of one commit to avoid downloading useless files.
Both when installing from a zip file or from a git repository we delete
the installed library folder if one with the same name is already
installed.1 parent ee076dd commit c8f9efb
File tree
2 files changed
+136
-7
lines changed- arduino/libraries/librariesmanager
- test
2 files changed
+136
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
108 | | - | |
109 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
110 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
111 | 159 | | |
112 | 160 | | |
113 | 161 | | |
| |||
120 | 168 | | |
121 | 169 | | |
122 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
123 | 174 | | |
124 | 175 | | |
125 | 176 | | |
126 | 177 | | |
127 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
128 | 194 | | |
129 | 195 | | |
| 196 | + | |
130 | 197 | | |
131 | 198 | | |
132 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
133 | 203 | | |
134 | 204 | | |
| 205 | + | |
| 206 | + | |
135 | 207 | | |
136 | 208 | | |
137 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
228 | 234 | | |
229 | | - | |
| 235 | + | |
230 | 236 | | |
231 | 237 | | |
232 | 238 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
237 | 247 | | |
238 | 248 | | |
239 | 249 | | |
| |||
249 | 259 | | |
250 | 260 | | |
251 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
252 | 266 | | |
253 | 267 | | |
254 | 268 | | |
255 | 269 | | |
256 | 270 | | |
257 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
258 | 281 | | |
259 | 282 | | |
260 | 283 | | |
| |||
440 | 463 | | |
441 | 464 | | |
442 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
443 | 469 | | |
444 | 470 | | |
445 | 471 | | |
| |||
462 | 488 | | |
463 | 489 | | |
464 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
465 | 494 | | |
466 | 495 | | |
467 | 496 | | |
| |||
483 | 512 | | |
484 | 513 | | |
485 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
0 commit comments