@@ -60,7 +60,8 @@ public static async Task<bool> EnsureNodeRepo(string url)
6060 string folderName = url . AfterLast ( '/' ) ;
6161 if ( ! Directory . Exists ( $ "{ nodePath } /{ folderName } ") )
6262 {
63- await Process . Start ( new ProcessStartInfo ( "git" , $ "clone { url } ") { WorkingDirectory = nodePath } ) . WaitForExitAsync ( Program . GlobalProgramCancel ) ;
63+ string response = await Utilities . RunGitProcess ( $ "clone { url } ", nodePath ) ;
64+ Logs . Debug ( $ "Comfy node clone response for { folderName } : { response . Trim ( ) } ") ;
6465 string reqFile = $ "{ nodePath } /{ folderName } /requirements.txt";
6566 ComfyUISelfStartBackend [ ] backends = [ .. Program . Backends . RunningBackendsOfType < ComfyUISelfStartBackend > ( ) ] ;
6667 if ( File . Exists ( reqFile ) && backends . Any ( ) )
@@ -92,7 +93,8 @@ public static async Task<bool> EnsureNodeRepo(string url)
9293 }
9394 else
9495 {
95- await NetworkBackendUtils . RunProcessWithMonitoring ( new ProcessStartInfo ( "git" , "pull" ) { WorkingDirectory = Path . GetFullPath ( $ "{ nodePath } /{ folderName } ") } , $ "comfy node pull ({ folderName } )", "comfynodepull" ) ;
96+ string response = await Utilities . RunGitProcess ( $ "pull", $ "{ nodePath } /{ folderName } ") ;
97+ Logs . Debug ( $ "Comfy node pull response for { folderName } : { response . Trim ( ) } ") ;
9698 }
9799 return false ;
98100 }
@@ -117,7 +119,8 @@ public static async Task EnsureNodeRepos()
117119 {
118120 if ( Directory . Exists ( $ "{ node } /.git") )
119121 {
120- tasks . Add ( NetworkBackendUtils . RunProcessWithMonitoring ( new ProcessStartInfo ( "git" , "pull" ) { WorkingDirectory = node } , $ "comfy node pull ({ node . Replace ( '\\ ' , '/' ) . AfterLast ( '/' ) } )", "comfynodepull" ) ) ;
122+ string response = await Utilities . RunGitProcess ( $ "pull", node ) ;
123+ Logs . Debug ( $ "Comfy node pull response for { node . Replace ( '\\ ' , '/' ) . AfterLast ( '/' ) } : { response . Trim ( ) } ") ;
121124 }
122125 }
123126 await Task . WhenAll ( tasks ) ;
@@ -234,15 +237,8 @@ public override async Task Init()
234237 {
235238 try
236239 {
237- ProcessStartInfo psi = new ( "git" , "pull" )
238- {
239- WorkingDirectory = Path . GetFullPath ( settings . StartScript ) . Replace ( '\\ ' , '/' ) . BeforeLast ( '/' ) ,
240- RedirectStandardError = true ,
241- RedirectStandardOutput = true
242- } ;
243- Process p = Process . Start ( psi ) ;
244- NetworkBackendUtils . ReportLogsFromProcess ( p , "ComfyUI (Git Pull)" , "" ) ;
245- await p . WaitForExitAsync ( Program . GlobalProgramCancel ) ;
240+ string response = await Utilities . RunGitProcess ( $ "pull", Path . GetFullPath ( settings . StartScript ) . Replace ( '\\ ' , '/' ) . BeforeLast ( '/' ) ) ;
241+ Logs . Debug ( $ "Comfy git pull response: { response . Trim ( ) } ") ;
246242 }
247243 catch ( Exception ex )
248244 {
0 commit comments