Skip to content

Instantly share code, notes, and snippets.

@computercam
Created December 6, 2020 20:37
Show Gist options
  • Save computercam/b6a8d273750b9cf1e2fe3972271251a0 to your computer and use it in GitHub Desktop.
Save computercam/b6a8d273750b9cf1e2fe3972271251a0 to your computer and use it in GitHub Desktop.
VSCodium / CODE-OSS visual studio marketplace product.json
#!/usr/bin/env bash
[[ `uname` == "Linux" ]] && PRODUCT_JSON="/usr/lib/code/product.json"
[[ `uname` == "Darwin" ]] && PRODUCT_JSON="/Applications/VSCodium.app/Contents/Resources/app/product.json"
echo "edit the following file"
echo "$PRODUCT_JSON"
echo ""
echo "find the following property"
echo "extensionsGallery"
echo ""
echo "add the following lines to that property"
echo '"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",'
echo '"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",'
echo '"itemUrl": "https://marketplace.visualstudio.com/items"'
sudo sed -E -i'' -e 's/"serviceUrl".*$/"serviceUrl": "https:\/\/marketplace.visualstudio.com\/_apis\/public\/gallery",/g' $PRODUCT_JSON
sudo sed -E -i'' -e 's/"cacheUrl".*$/"cacheUrl": "https:\/\/vscode.blob.core.windows.net\/gallery\/index",/g' $PRODUCT_JSON
sudo sed -E -i'' -e 's/"itemUrl".*$/"itemUrl": "https:\/\/marketplace.visualstudio.com\/items"/g' $PRODUCT_JSON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment