mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 19:48:37 -05:00
Vscode merge (#4582)
* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd * fix issues with merges * bump node version in azpipe * replace license headers * remove duplicate launch task * fix build errors * fix build errors * fix tslint issues * working through package and linux build issues * more work * wip * fix packaged builds * working through linux build errors * wip * wip * wip * fix mac and linux file limits * iterate linux pipeline * disable editor typing * revert series to parallel * remove optimize vscode from linux * fix linting issues * revert testing change * add work round for new node * readd packaging for extensions * fix issue with angular not resolving decorator dependencies
This commit is contained in:
@@ -4,12 +4,14 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { tmpdir } from 'os';
|
||||
import { firstIndex } from 'vs/base/common/arrays';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ParsedArgs } from '../common/environment';
|
||||
import { MIN_MAX_MEMORY_SIZE_MB } from 'vs/platform/files/common/files';
|
||||
import { parseArgs } from 'vs/platform/environment/node/argv';
|
||||
|
||||
import { join } from 'vs/base/common/path';
|
||||
import { writeFile } from 'vs/base/node/pfs';
|
||||
|
||||
function validate(args: ParsedArgs): ParsedArgs {
|
||||
if (args.goto) {
|
||||
@@ -17,7 +19,7 @@ function validate(args: ParsedArgs): ParsedArgs {
|
||||
}
|
||||
|
||||
if (args['max-memory']) {
|
||||
assert(args['max-memory'] >= MIN_MAX_MEMORY_SIZE_MB, `The max-memory argument cannot be specified lower than ${MIN_MAX_MEMORY_SIZE_MB} MB.`);
|
||||
assert(parseInt(args['max-memory']) >= MIN_MAX_MEMORY_SIZE_MB, `The max-memory argument cannot be specified lower than ${MIN_MAX_MEMORY_SIZE_MB} MB.`);
|
||||
}
|
||||
|
||||
return args;
|
||||
@@ -57,4 +59,22 @@ export function parseCLIProcessArgv(processArgv: string[]): ParsedArgs {
|
||||
}
|
||||
|
||||
return validate(parseArgs(args));
|
||||
}
|
||||
}
|
||||
|
||||
export function createWaitMarkerFile(verbose?: boolean): Promise<string> {
|
||||
const randomWaitMarkerPath = join(tmpdir(), Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10));
|
||||
|
||||
return writeFile(randomWaitMarkerPath, '').then(() => {
|
||||
if (verbose) {
|
||||
console.log(`Marker file for --wait created: ${randomWaitMarkerPath}`);
|
||||
}
|
||||
|
||||
return randomWaitMarkerPath;
|
||||
}, error => {
|
||||
if (verbose) {
|
||||
console.error(`Failed to create marker file for --wait: ${error}`);
|
||||
}
|
||||
|
||||
return Promise.resolve(undefined);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user