File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ internal struct Init: SwiftlyCommand {
76
76
These locations can be changed with SWIFTLY_HOME and SWIFTLY_BIN environment variables and run this again.
77
77
\( installMsg)
78
78
""" )
79
+
79
80
guard SwiftlyCore . promptForConfirmation ( defaultBehavior: true ) else {
80
81
throw SwiftlyError ( message: " Swiftly installation has been cancelled " )
81
82
}
Original file line number Diff line number Diff line change @@ -209,6 +209,11 @@ extension Platform {
209
209
if pgid != - 1 {
210
210
tcsetpgrp ( STDOUT_FILENO, process. processIdentifier)
211
211
}
212
+
213
+ defer { if pgid != - 1 {
214
+ tcsetpgrp ( STDOUT_FILENO, pgid)
215
+ } }
216
+
212
217
process. waitUntilExit ( )
213
218
214
219
guard process. terminationStatus == 0 else {
@@ -250,6 +255,10 @@ extension Platform {
250
255
if pgid != - 1 {
251
256
tcsetpgrp ( STDOUT_FILENO, process. processIdentifier)
252
257
}
258
+ defer { if pgid != - 1 {
259
+ tcsetpgrp ( STDOUT_FILENO, pgid)
260
+ } }
261
+
253
262
let outData = try outPipe. fileHandleForReading. readToEnd ( )
254
263
255
264
process. waitUntilExit ( )
You can’t perform that action at this time.
0 commit comments