File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ def run(
62
62
kwargs .setdefault ("cwd" , self .clone_path )
63
63
return subprocess .run (* popenargs , check = check , ** kwargs )
64
64
65
+ def shell (self ) -> None :
66
+ print ('Run "exit 1" to abort' )
67
+ self .run ([os .environ .get ("SHELL" , "/bin/bash" )])
68
+
65
69
def commit_changes (self , message : str ) -> None :
66
70
self .run (["git" , "add" , "--" , "." ])
67
71
self .run (
@@ -92,8 +96,7 @@ def lint_test(self) -> None:
92
96
except subprocess .CalledProcessError as e :
93
97
print (e )
94
98
print ("Resolve errors and exit shell to continue" )
95
- print ('Run "exit 1" to abort' )
96
- self .run ([os .environ .get ("SHELL" , "/bin/bash" )])
99
+ self .shell ()
97
100
98
101
def open_pr (self , message : str ) -> None :
99
102
if self .dry_run :
Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ def update_cruft(repo: RepoSandbox) -> Optional[str]:
49
49
if try_count == 0 :
50
50
print (f">>> Conflicts found: { rej_files } " )
51
51
print ("Resolve conflicts and exit shell to continue" )
52
- print ('Run "exit 1" to abort' )
53
- repo .run ([os .environ .get ("SHELL" , "/bin/bash" )])
52
+ repo .shell ()
54
53
continue
55
54
raise Exception (f"Unresolved conflicts: { rej_files } " )
56
55
You can’t perform that action at this time.
0 commit comments