Skip to content

Commit

Permalink
Merge branch 'main' into foreground-process-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbute authored Feb 11, 2025
2 parents 9826fc2 + 7517530 commit c765ea6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions Sources/Swiftly/Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal struct Init: SwiftlyCommand {
\(installMsg)
""")

guard promptForConfirmation(defaultBehavior: true) else {
guard SwiftlyCore.promptForConfirmation(defaultBehavior: true) else {
throw SwiftlyError(message: "Swiftly installation has been cancelled")
}
}
Expand All @@ -93,7 +93,7 @@ internal struct Init: SwiftlyCommand {
SwiftlyCore.print(" \(swiftlyBinDir.appendingPathComponent(executable).path)")
}

guard promptForConfirmation(defaultBehavior: false) else {
guard SwiftlyCore.promptForConfirmation(defaultBehavior: false) else {
throw SwiftlyError(message: "Swiftly installation has been cancelled")
}
}
Expand Down Expand Up @@ -201,8 +201,12 @@ internal struct Init: SwiftlyCommand {
try FileManager.default.createDirectory(at: confDir, withIntermediateDirectories: true)
profileHome = confDir.appendingPathComponent("swiftly.fish", isDirectory: false)
} else {
let confDir = userHome.appendingPathComponent(".config/fish/conf.d", isDirectory: true)
try FileManager.default.createDirectory(at: confDir, withIntermediateDirectories: true)
let confDir = userHome.appendingPathComponent(
".config/fish/conf.d", isDirectory: true
)
try FileManager.default.createDirectory(
at: confDir, withIntermediateDirectories: true
)
profileHome = confDir.appendingPathComponent("swiftly.fish", isDirectory: false)
}
} else {
Expand Down
3 changes: 2 additions & 1 deletion Sources/Swiftly/Install.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ struct Install: SwiftlyCommand {
SwiftlyCore.print(" \(swiftlyBinDir.appendingPathComponent(executable).path)")
}

guard promptForConfirmation(defaultBehavior: false) else {

guard SwiftlyCore.promptForConfirmation(defaultBehavior: false) else {
throw SwiftlyError(message: "Toolchain installation has been cancelled")
}
}
Expand Down

0 comments on commit c765ea6

Please sign in to comment.