Commit 29d9d8c
authored
Automatically install Coder CLI (#9)
* Run preflight before all binary invocations
Otherwise the first command you run or action you perform will always
fail, then the binary will install, then you have to redo the action.
To accomplish this every command should call execCoder instead of
calling exec directly.
It did not appear necessary to have a separate exec and execCombined so
I removed exec and renamed execCombined to exec.
I also removed execJSON to avoid needing to have another function called
execCoderJSON since you can just wrap with JSON.parse which is pretty
minimal.
Lastly I refactored the install logic so it includes a progress bar and
can eventually support downloading the binary.
* Stream installation progress
Instead of waiting for the end.
We will be able to use this for logs as well.
* Make Coder CLI invocation an object
This seems safer than trying to split on spaces.
* Store extension context
This will be needed to get the path for storing the binary.
* Add code for making requests
* Add code for extracting tars and zips
* Download binary when not on PATH1 parent 63a0bcf commit 29d9d8c
File tree
16 files changed
+1174
-131
lines changed- fixtures
- src
- test
16 files changed
+1174
-131
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| 36 | + | |
| 37 | + | |
26 | 38 | | |
27 | 39 | | |
28 | 40 | | |
| |||
0 commit comments