@@ -38,6 +38,7 @@ class TaskfileService {
3838    private  static  terminal : vscode . Terminal ; 
3939    private  lastTaskName : string  |  undefined ; 
4040    private  lastTaskDir : string  |  undefined ; 
41+     private  lastTaskCliArgs : string  |  undefined ; 
4142    private  version : semver . SemVer  |  undefined ; 
4243
4344    private  constructor ( )  { 
@@ -223,7 +224,7 @@ class TaskfileService {
223224            vscode . window . showErrorMessage ( `No task has been run yet.` ) ; 
224225            return ; 
225226        } 
226-         await  this . runTask ( this . lastTaskName ,  this . lastTaskDir ) ; 
227+         await  this . runTask ( this . lastTaskName ,  this . lastTaskDir ,   this . lastTaskCliArgs ) ; 
227228    } 
228229
229230    public  async  runTask ( taskName : string ,  dir ?: string ,  cliArgs ?: string ) : Promise < void >  { 
@@ -241,6 +242,11 @@ class TaskfileService {
241242            } 
242243            TaskfileService . terminal . show ( ) ; 
243244            TaskfileService . terminal . sendText ( this . command ( taskName ,  cliArgs ) ) ; 
245+             log . info ( `Task completed on the terminal` ) ; 
246+             TaskfileService . outputChannel . append ( `task: completed on the terminal\n` ) ; 
247+             this . lastTaskName  =  taskName ; 
248+             this . lastTaskDir  =  dir ; 
249+             this . lastTaskCliArgs  =  cliArgs ; 
244250        }  else  { 
245251            return  await  new  Promise ( ( resolve )  =>  { 
246252                log . info ( `Running task: "${ taskName }  " in: "${ dir }  "` ) ; 
@@ -277,6 +283,7 @@ class TaskfileService {
277283                    TaskfileService . outputChannel . append ( `task: completed with code ${ code }  \n` ) ; 
278284                    this . lastTaskName  =  taskName ; 
279285                    this . lastTaskDir  =  dir ; 
286+                     this . lastTaskCliArgs  =  cliArgs ; 
280287                    return  resolve ( ) ; 
281288                } ) ; 
282289            } ) ; 
0 commit comments