Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Extension/.scripts/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ chdir($root);

// dump unhandled async errors to the console and exit.
process.on('unhandledRejection', (reason: any, _promise) => {
error(`${reason?.stack?.split(/\r?\n/).filter(l => !l.includes('node:internal') && !l.includes('node_modules')).join('\n')}`);
error(`${reason?.stack?.split(/\r?\n/).filter((l: string) => !l.includes('node:internal') && !l.includes('node_modules')).join('\n')}`);
process.exit(1);
});

Expand Down
4 changes: 2 additions & 2 deletions Extension/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import * as vscode from 'vscode';
import { DocumentFilter, Range } from 'vscode-languageclient';
import * as nls from 'vscode-nls';
import { TargetPopulation } from 'vscode-tas-client';
import * as which from "which";
import { ManualPromise } from './Utility/Async/manualPromise';
import { isWindows } from './constants';
import { getOutputChannelLogger, showOutputChannel } from './logger';
import { PlatformInformation } from './platform';
import * as Telemetry from './telemetry';
import which = require('which');

nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
Expand Down Expand Up @@ -1528,7 +1528,7 @@ export interface ISshLocalForwardInfo {

export function whichAsync(name: string, path?: string): Promise<string | undefined> {
return new Promise<string | undefined>(resolve => {
which(name, path ? { path } : {}, (err, resolved) => {
which(name, path ? { path } : {}, (err: Error | null, resolved: string | undefined) => {
if (err) {
resolve(undefined);
} else {
Expand Down
Loading