File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 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 {
7676 These locations can be changed with SWIFTLY_HOME and SWIFTLY_BIN environment variables and run this again.
7777 \( installMsg)
7878 """ )
79+
7980 guard SwiftlyCore . promptForConfirmation ( defaultBehavior: true ) else {
8081 throw SwiftlyError ( message: " Swiftly installation has been cancelled " )
8182 }
Original file line number Diff line number Diff line change @@ -209,6 +209,11 @@ extension Platform {
209209 if pgid != - 1 {
210210 tcsetpgrp ( STDOUT_FILENO, process. processIdentifier)
211211 }
212+
213+ defer { if pgid != - 1 {
214+ tcsetpgrp ( STDOUT_FILENO, pgid)
215+ } }
216+
212217 process. waitUntilExit ( )
213218
214219 guard process. terminationStatus == 0 else {
@@ -250,6 +255,10 @@ extension Platform {
250255 if pgid != - 1 {
251256 tcsetpgrp ( STDOUT_FILENO, process. processIdentifier)
252257 }
258+ defer { if pgid != - 1 {
259+ tcsetpgrp ( STDOUT_FILENO, pgid)
260+ } }
261+
253262 let outData = try outPipe. fileHandleForReading. readToEnd ( )
254263
255264 process. waitUntilExit ( )
You can’t perform that action at this time.
0 commit comments