VScdoe error:Could not create temporary directory Permission denied

Catalogue
  1. 1. Could not create temporary directory: Permission denied
  2. 2. Problem
  3. 3. Solution
    1. 3.1. If you are using normal VScode
    2. 3.2. If you are using insiders version

Could not create temporary directory: Permission denied

This error looks familiar?

Problem

If you happen to not being able to update VScode anymore after upgrading to macOS is may be due to some permission issues.

Solution

If you are using normal VScode

sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt

If you are using insiders version

sudo chown $USER ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt

These commands will change the permissions of vscode folders to the current user.