Skip to content
Merged
1 change: 1 addition & 0 deletions Sources/Swiftly/Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ internal struct Init: SwiftlyCommand {
These locations can be changed with SWIFTLY_HOME and SWIFTLY_BIN environment variables and run this again.
\(installMsg)
""")

guard SwiftlyCore.promptForConfirmation(defaultBehavior: true) else {
throw SwiftlyError(message: "Swiftly installation has been cancelled")
}
Expand Down
8 changes: 8 additions & 0 deletions Sources/SwiftlyCore/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ extension Platform {
}
process.waitUntilExit()

defer { if pgid != -1 {
tcsetpgrp(STDOUT_FILENO, pgid)
}}

guard process.terminationStatus == 0 else {
throw RunProgramError(exitCode: process.terminationStatus, program: args.first!)
}
Expand Down Expand Up @@ -254,6 +258,10 @@ extension Platform {

process.waitUntilExit()

defer { if pgid != -1 {
tcsetpgrp(STDOUT_FILENO, pgid)
}}

guard process.terminationStatus == 0 else {
throw RunProgramError(exitCode: process.terminationStatus, program: args.first!)
}
Expand Down