Merge from vscode 2cd495805cf99b31b6926f08ff4348124b2cf73d

This commit is contained in:
ADS Merger
2020-06-30 04:40:21 +00:00
committed by AzureDataStudio
parent a8a7559229
commit 1388493cc1
602 changed files with 16375 additions and 12940 deletions

View File

@@ -21,7 +21,7 @@ const product = require('../product.json');
const { app, protocol } = require('electron');
// Enable portable support
const portable = bootstrap.configurePortable();
const portable = bootstrap.configurePortable(product);
// Enable ASAR support
bootstrap.enableASARSupport();
@@ -93,8 +93,9 @@ setCurrentWorkingDirectory();
// Register custom schemes with privileges
protocol.registerSchemesAsPrivileged([
{
scheme: 'vscode-resource',
scheme: 'vscode-webview',
privileges: {
standard: true,
secure: true,
supportFetchAPI: true,
corsEnabled: true,
@@ -473,7 +474,7 @@ function getNodeCachedDir() {
async ensureExists() {
try {
await bootstrap.mkdirp(this.value);
await mkdirp(this.value);
return this.value;
} catch (error) {
@@ -502,6 +503,18 @@ function getNodeCachedDir() {
};
}
/**
* @param {string} dir
* @returns {Promise<string>}
*/
function mkdirp(dir) {
const fs = require('fs');
return new Promise((resolve, reject) => {
fs.mkdir(dir, { recursive: true }, err => (err && err.code !== 'EEXIST') ? reject(err) : resolve(dir));
});
}
//#region NLS Support
/**