swiftlang / swiftly

A Swift toolchain installer and manager, written in Swift.
https://swiftlang.github.io/swiftly/
Apache License 2.0
462 stars 22 forks source link

Consistency in y/n prompts #141

Open carlynorama opened 1 month ago

carlynorama commented 1 month ago

Some accept just y or just Y some both. (swifty-install.sh, the intro to the package accepts both.)

MacOS.swift and Linux.swift go their own ways in asking for confirmation (line 121, 135 respectively) in their use() functions for overwriting symlinks, only accepting y, but not warning on a Y.

perhaps these functions should be using

promptForConfirmation(defaultBehavior: Bool) from Utils.swift (line 19)?

patrickfreed commented 1 month ago

Yeah we should definitely be consistent with this. Merging swiftly-install.sh into swiftly itself will help with that too, we just need to make sure to use the same promptForConfirmation everywhere once we do that.

adam-fowler commented 1 month ago

@cmcgee1024 Can you verify your swiftly init PR is consistent