File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ internal struct Init: SwiftlyCommand {
7777 \( installMsg)
7878 """ )
7979
80- if SwiftlyCore . readLine ( prompt : " Proceed with the installation? [Y/n] " ) == " n " {
80+ guard promptForConfirmation ( defaultBehavior : true ) else {
8181 throw SwiftlyError ( message: " Swiftly installation has been cancelled " )
8282 }
8383 }
@@ -93,9 +93,7 @@ internal struct Init: SwiftlyCommand {
9393 SwiftlyCore . print ( " \( swiftlyBinDir. appendingPathComponent ( executable) . path) " )
9494 }
9595
96- let proceed = SwiftlyCore . readLine ( prompt: " Proceed? [y/N] " ) ?? " n "
97-
98- guard proceed == " y " else {
96+ guard promptForConfirmation ( defaultBehavior: false ) else {
9997 throw SwiftlyError ( message: " Swiftly installation has been cancelled " )
10098 }
10199 }
Original file line number Diff line number Diff line change @@ -266,9 +266,7 @@ struct Install: SwiftlyCommand {
266266 SwiftlyCore . print ( " \( swiftlyBinDir. appendingPathComponent ( executable) . path) " )
267267 }
268268
269- let proceed = SwiftlyCore . readLine ( prompt: " Proceed? [y/N] " ) ?? " n "
270-
271- guard proceed == " y " else {
269+ guard promptForConfirmation ( defaultBehavior: false ) else {
272270 throw SwiftlyError ( message: " Toolchain installation has been cancelled " )
273271 }
274272 }
You can’t perform that action at this time.
0 commit comments