mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 18:46:36 -05:00
Merge from vscode merge-base (#22769)
* Merge from vscode merge-base * Turn off basic checks * Enable compilation, unit, and integration tests
This commit is contained in:
@@ -8,7 +8,7 @@ import { chmodSync, existsSync, readFileSync, statSync, truncateSync, unlinkSync
|
||||
import { homedir, release, tmpdir } from 'os';
|
||||
import type { ProfilingSession, Target } from 'v8-inspect-profiler';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { isAbsolute, resolve } from 'vs/base/common/path';
|
||||
import { isAbsolute, resolve, join } from 'vs/base/common/path';
|
||||
import { IProcessEnvironment, isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
import { randomPort } from 'vs/base/common/ports';
|
||||
import { isString } from 'vs/base/common/types';
|
||||
@@ -24,6 +24,8 @@ import product from 'vs/platform/product/common/product';
|
||||
import { CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import { randomPath } from 'vs/base/common/extpath';
|
||||
import { Utils } from 'vs/platform/profiling/common/profiling';
|
||||
import { dirname } from 'vs/base/common/resources';
|
||||
import { FileAccess } from 'vs/base/common/network';
|
||||
|
||||
function shouldSpawnCliProcess(argv: NativeParsedArgs): boolean {
|
||||
return !!argv['install-source']
|
||||
@@ -59,6 +61,21 @@ export async function main(argv: string[]): Promise<any> {
|
||||
console.log(buildVersionMessage(product.version, product.commit));
|
||||
}
|
||||
|
||||
// Shell integration
|
||||
else if (args['locate-shell-integration-path']) {
|
||||
let file: string;
|
||||
switch (args['locate-shell-integration-path']) {
|
||||
// Usage: `[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"`
|
||||
case 'bash': file = 'shellIntegration-bash.sh'; break;
|
||||
// Usage: `if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }`
|
||||
case 'pwsh': file = 'shellIntegration.ps1'; break;
|
||||
// Usage: `[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"`
|
||||
case 'zsh': file = 'shellIntegration-rc.zsh'; break;
|
||||
default: throw new Error('Error using --locate-shell-integration-path: Invalid shell type');
|
||||
}
|
||||
console.log(join(dirname(FileAccess.asFileUri('', require)).fsPath, 'out', 'vs', 'workbench', 'contrib', 'terminal', 'browser', 'media', file));
|
||||
}
|
||||
|
||||
// Extensions Management
|
||||
else if (shouldSpawnCliProcess(args)) {
|
||||
const cli = await new Promise<IMainCli>((resolve, reject) => require(['vs/code/node/cliProcessMain'], resolve, reject));
|
||||
@@ -286,7 +303,7 @@ export async function main(argv: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
let suffix = '';
|
||||
let result = await session.stop();
|
||||
const result = await session.stop();
|
||||
if (!process.env['VSCODE_DEV']) {
|
||||
// when running from a not-development-build we remove
|
||||
// absolute filenames because we don't want to reveal anything
|
||||
|
||||
Reference in New Issue
Block a user