Skip to content

Instantly share code, notes, and snippets.

@goetzc
Forked from rojnwa/fix_codium.py
Last active April 17, 2021 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goetzc/cf1e31f8ec10ecf8d715ad980c62008c to your computer and use it in GitHub Desktop.
Save goetzc/cf1e31f8ec10ecf8d715ad980c62008c to your computer and use it in GitHub Desktop.
Reverts to the old marketplace in VSCodium
#!/usr/bin/env python
import json
PRODUCT_PATH = "/usr/lib/code/product.json"
official_gallery = {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items",
}
with open(PRODUCT_PATH, "r") as f:
config = json.load(f)
print("Current values:")
print(json.dumps(config["extensionsGallery"], sort_keys=True, indent=2))
config["extensionsGallery"]["serviceUrl"] = official_gallery["serviceUrl"]
config["extensionsGallery"]["cacheUrl"] = official_gallery["cacheUrl"]
config["extensionsGallery"]["itemUrl"] = official_gallery["itemUrl"]
with open(PRODUCT_PATH, "w") as f:
json.dump(config, f, indent=2)
print("New values:")
print(json.dumps(config["extensionsGallery"], sort_keys=True, indent=2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment