File tree 1 file changed +6
-24
lines changed
1 file changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -164,31 +164,13 @@ export function addCommands(
164
164
label : trans . __ ( 'Open Git Repository in Terminal' ) ,
165
165
caption : trans . __ ( 'Open a New Terminal to the Git Repository' ) ,
166
166
execute : async args => {
167
- const main = ( await commands . execute (
168
- 'terminal:create-new' ,
169
- args
170
- ) ) as MainAreaWidget < ITerminal . ITerminal > ;
167
+ const cwd = gitModel . pathRepository ;
168
+ const main = ( await commands . execute ( 'terminal:create-new' , {
169
+ ...args ,
170
+ cwd
171
+ } ) ) as MainAreaWidget < ITerminal . ITerminal > ;
171
172
172
- try {
173
- if ( gitModel . pathRepository !== null ) {
174
- const terminal = main . content ;
175
- terminal . session . send ( {
176
- type : 'stdin' ,
177
- content : [
178
- `cd "${ gitModel . pathRepository
179
- . split ( '"' )
180
- . join ( '\\"' )
181
- . split ( '`' )
182
- . join ( '\\`' ) } "\n`
183
- ]
184
- } ) ;
185
- }
186
-
187
- return main ;
188
- } catch ( e ) {
189
- console . error ( e ) ;
190
- main . dispose ( ) ;
191
- }
173
+ return main ;
192
174
} ,
193
175
isEnabled : ( ) =>
194
176
gitModel . pathRepository !== null &&
You can’t perform that action at this time.
0 commit comments