LOLINTERNETZ / vscodeoffline

Enables Visual Studio Code's extension gallery to be used in offline (air-gapped) environments. Or, run your own gallery!
https://hub.docker.com/u/lolinternet
MIT License
95 stars 28 forks source link

--total-recommended does not honor value #66

Open pappasjfed opened 2 months ago

pappasjfed commented 2 months ago

I am having an issue where the --total-recommended flag does not honor value passed.

docker run \
    -v ./artifacts/:/artifacts/ \
    -e SYNCARGS="--sync --frequency 0  --total-recommended 50 --check-specified-extensions --skip-binaries" \
    lolinternet/vscsync

Results in [I 240508 16:03:47 sync:792] Checking and Downloading Updates for 230 Extensions

docker run \
    -v ./artifacts/:/artifacts/ \
    -e SYNCARGS="--sync --frequency 0  --total-recommended 1" \
    lolinternet/vscsync

Results in [I 240508 16:03:57 sync:792] Checking and Downloading Updates for 195 Extensions

This work is a lifesaver. Thank you so much!

LOLINTERNETZ commented 2 months ago

Thanks @pappasjfed. I've just had a quick look at this.

In effect, this argument is going to be somewhat useless unless you're doing semi-weird stuff. It is evaluated as the sum of Microsoft's old/original static list of recommended extensions (~195 extensions) + the --total-recommended count, which comes from a newer search API. This is useful when you want to fetch > 200 extensions but not the entire archive. I've updated the argument description slightly so it now refers to the search API.