File tree Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -50,28 +50,6 @@ public void Exec()
50
50
}
51
51
}
52
52
53
- protected Result ReadToEnd ( )
54
- {
55
- using var proc = new Process ( ) { StartInfo = CreateGitStartInfo ( true ) } ;
56
-
57
- try
58
- {
59
- proc . Start ( ) ;
60
- }
61
- catch ( Exception e )
62
- {
63
- return Result . Failed ( e . Message ) ;
64
- }
65
-
66
- var rs = new Result ( ) { IsSuccess = true } ;
67
- rs . StdOut = proc . StandardOutput . ReadToEnd ( ) ;
68
- rs . StdErr = proc . StandardError . ReadToEnd ( ) ;
69
- proc . WaitForExit ( ) ;
70
-
71
- rs . IsSuccess = proc . ExitCode == 0 ;
72
- return rs ;
73
- }
74
-
75
53
public async Task < bool > ExecAsync ( )
76
54
{
77
55
Log ? . AppendLine ( $ "$ git { Args } \n ") ;
@@ -149,6 +127,28 @@ public async Task<bool> ExecAsync()
149
127
return true ;
150
128
}
151
129
130
+ protected Result ReadToEnd ( )
131
+ {
132
+ using var proc = new Process ( ) { StartInfo = CreateGitStartInfo ( true ) } ;
133
+
134
+ try
135
+ {
136
+ proc . Start ( ) ;
137
+ }
138
+ catch ( Exception e )
139
+ {
140
+ return Result . Failed ( e . Message ) ;
141
+ }
142
+
143
+ var rs = new Result ( ) { IsSuccess = true } ;
144
+ rs . StdOut = proc . StandardOutput . ReadToEnd ( ) ;
145
+ rs . StdErr = proc . StandardError . ReadToEnd ( ) ;
146
+ proc . WaitForExit ( ) ;
147
+
148
+ rs . IsSuccess = proc . ExitCode == 0 ;
149
+ return rs ;
150
+ }
151
+
152
152
protected async Task < Result > ReadToEndAsync ( )
153
153
{
154
154
using var proc = new Process ( ) { StartInfo = CreateGitStartInfo ( true ) } ;
You can’t perform that action at this time.
0 commit comments