File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -44,13 +44,14 @@ function zigRun() {
44
44
if ( ! zigPath ) return ;
45
45
const filePath = vscode . window . activeTextEditor . document . uri . fsPath ;
46
46
const terminal = vscode . window . createTerminal ( "Run Zig Program" ) ;
47
+ const callOperator = / ( p o w e r s h e l l .e x e $ | p o w e r s h e l l $ | p w s h .e x e $ | p w s h $ ) / . test ( vscode . env . shell ) ? "& " : "" ;
47
48
terminal . show ( ) ;
48
49
const wsFolder = getWorkspaceFolder ( filePath ) ;
49
50
if ( wsFolder && isWorkspaceFile ( filePath ) && hasBuildFile ( wsFolder . uri . fsPath ) ) {
50
- terminal . sendText ( `${ escapePath ( zigPath ) } build run` ) ;
51
+ terminal . sendText ( `${ callOperator } ${ escapePath ( zigPath ) } build run` ) ;
51
52
return ;
52
53
}
53
- terminal . sendText ( `${ escapePath ( zigPath ) } run ${ escapePath ( filePath ) } ` ) ;
54
+ terminal . sendText ( `${ callOperator } ${ escapePath ( zigPath ) } run ${ escapePath ( filePath ) } ` ) ;
54
55
}
55
56
56
57
function escapePath ( rawPath : string ) : string {
You can’t perform that action at this time.
0 commit comments