mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
server.cli.ts does not await Promises (#235738)
This commit is contained in:
committed by
GitHub
parent
d239906998
commit
f43f3cc8f9
@@ -1,6 +1,7 @@
|
||||
@echo off
|
||||
setlocal
|
||||
SET VSCODE_PATH=%~dp0..\..\..\..
|
||||
SET VSCODE_DEV=1
|
||||
FOR /F "tokens=* USEBACKQ" %%g IN (`where /r "%VSCODE_PATH%\.build\node" node.exe`) do (SET "NODE=%%g")
|
||||
call "%NODE%" "%VSCODE_PATH%\out\server-cli.js" "Code Server - Dev" "" "" "code.cmd" %*
|
||||
endlocal
|
||||
|
||||
@@ -10,6 +10,8 @@ else
|
||||
VSCODE_PATH=$(dirname $(dirname $(dirname $(dirname $(dirname $(readlink -f $0))))))
|
||||
fi
|
||||
|
||||
export VSCODE_DEV=1
|
||||
|
||||
PROD_NAME="Code Server - Dev"
|
||||
VERSION=""
|
||||
COMMIT=""
|
||||
|
||||
@@ -30,4 +30,4 @@ if (process.env['VSCODE_DEV']) {
|
||||
await bootstrapESM();
|
||||
|
||||
// Load Server
|
||||
await import('./vs/server/node/server.cli');
|
||||
await import('./vs/server/node/server.cli.js');
|
||||
|
||||
@@ -154,7 +154,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
|
||||
}
|
||||
if (cliPipe) {
|
||||
if (parsedArgs['openExternal']) {
|
||||
openInBrowser(parsedArgs['_'], verbose);
|
||||
await openInBrowser(parsedArgs['_'], verbose);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -294,7 +294,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
|
||||
}
|
||||
} else {
|
||||
if (parsedArgs.status) {
|
||||
sendToPipe({
|
||||
await sendToPipe({
|
||||
type: 'status'
|
||||
}, verbose).then((res: string) => {
|
||||
console.log(res);
|
||||
@@ -305,7 +305,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
|
||||
}
|
||||
|
||||
if (parsedArgs['install-extension'] !== undefined || parsedArgs['uninstall-extension'] !== undefined || parsedArgs['list-extensions'] || parsedArgs['update-extensions']) {
|
||||
sendToPipe({
|
||||
await sendToPipe({
|
||||
type: 'extensionManagement',
|
||||
list: parsedArgs['list-extensions'] ? { showVersions: parsedArgs['show-versions'], category: parsedArgs['category'] } : undefined,
|
||||
install: asExtensionIdOrVSIX(parsedArgs['install-extension']),
|
||||
@@ -328,7 +328,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
|
||||
waitMarkerFilePath = createWaitMarkerFileSync(verbose);
|
||||
}
|
||||
|
||||
sendToPipe({
|
||||
await sendToPipe({
|
||||
type: 'open',
|
||||
fileURIs,
|
||||
folderURIs,
|
||||
@@ -345,7 +345,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
|
||||
});
|
||||
|
||||
if (waitMarkerFilePath) {
|
||||
waitForFileDeleted(waitMarkerFilePath);
|
||||
await waitForFileDeleted(waitMarkerFilePath);
|
||||
}
|
||||
|
||||
if (readFromStdinPromise) {
|
||||
@@ -371,7 +371,7 @@ async function waitForFileDeleted(path: string) {
|
||||
}
|
||||
}
|
||||
|
||||
function openInBrowser(args: string[], verbose: boolean) {
|
||||
async function openInBrowser(args: string[], verbose: boolean) {
|
||||
const uris: string[] = [];
|
||||
for (const location of args) {
|
||||
try {
|
||||
@@ -385,7 +385,7 @@ function openInBrowser(args: string[], verbose: boolean) {
|
||||
}
|
||||
}
|
||||
if (uris.length) {
|
||||
sendToPipe({
|
||||
await sendToPipe({
|
||||
type: 'openExternal',
|
||||
uris
|
||||
}, verbose).catch(e => {
|
||||
|
||||
Reference in New Issue
Block a user