4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
6
import { IAction } from 'vs/base/common/actions' ;
7
- import { isWindows } from 'vs/base/common/platform' ;
8
7
import { localize } from 'vs/nls' ;
9
8
import { IOpenerService } from 'vs/platform/opener/common/opener' ;
10
9
import { QuickFixMatchResult , ITerminalQuickFixAction , ITerminalQuickFixOptions , ITerminalInstance } from 'vs/workbench/contrib/terminal/browser/terminal' ;
@@ -14,7 +13,7 @@ export const GitCommandLineRegex = /git/;
14
13
export const GitPushCommandLineRegex = / g i t \s + p u s h / ;
15
14
export const AnyCommandLineRegex = / .+ / ;
16
15
export const GitSimilarOutputRegex = / m o s t s i m i l a r c o m m a n d i s \s * ( [ ^ \s ] { 3 , } ) / ;
17
- export const FreePortOutputRegex = / a d d r e s s a l r e a d y i n u s e \d \. \d \. \d \. \d : ( \d \d \d \d ) | U n a b l e t o b i n d [ ^ ] * : ( \d + ) | c a n ' t l i s t e n o n p o r t ( \d + ) | l i s t e n E A D D R I N U S E [ ^ ] * : ( \d + ) / ;
16
+ export const FreePortOutputRegex = / a d d r e s s a l r e a d y i n u s e \d + \. \d + \. \d + \. \d + : ( \d { 4 , 5 } ) | U n a b l e t o b i n d [ ^ ] * : ( \d { 4 , 5 } ) | c a n ' t l i s t e n o n p o r t ( \d { 4 , 5 } ) | l i s t e n E A D D R I N U S E [ ^ ] * : ( \d { 4 , 5 } ) / ;
18
17
export const GitPushOutputRegex = / g i t p u s h - - s e t - u p s t r e a m o r i g i n ( [ ^ \s ] + ) / ;
19
18
export const GitCreatePrOutputRegex = / C r e a t e a p u l l r e q u e s t f o r \' ( [ ^ \s ] + ) \' o n G i t H u b b y v i s i t i n g : \s * r e m o t e : \s * ( h t t p s : .+ p u l l .+ ) / ;
20
19
@@ -50,8 +49,7 @@ export function freePort(terminalInstance?: Partial<ITerminalInstance>): ITermin
50
49
return {
51
50
quickFixLabel : ( matchResult : QuickFixMatchResult ) => matchResult . outputMatch ? `Free port ${ matchResult . outputMatch [ 1 ] } ` : '' ,
52
51
commandLineMatcher : AnyCommandLineRegex ,
53
- // TODO: Support free port on Windows https://github.com/microsoft/vscode/issues/161775
54
- outputMatcher : isWindows ? undefined : {
52
+ outputMatcher : {
55
53
lineMatcher : FreePortOutputRegex ,
56
54
anchor : 'bottom' ,
57
55
offset : 0 ,
0 commit comments