Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/CLI/Image/ImageList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ extension Application {
if options.quiet && options.verbose {
throw ContainerizationError(.invalidArgument, message: "Cannot use flag --quite and --verbose together")
}
let modifer = options.quiet || options.verbose
if modifer && options.format == .json {
let modifier = options.quiet || options.verbose
if modifier && options.format == .json {
throw ContainerizationError(.invalidArgument, message: "Cannot use flag --quite or --verbose along with --format json")
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerClient/XPC+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public enum XPCKeys: String {
case port
/// Exit code for a process
case exitCode
/// An event that occured in a container
/// An event that occurred in a container
case containerEvent
/// Error key.
case error
Expand Down
2 changes: 1 addition & 1 deletion Sources/ContainerXPC/XPCMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import ContainerizationError
import Foundation

/// A message that can be pass across application boundries via XPC.
/// A message that can be pass across application boundaries via XPC.
public struct XPCMessage: Sendable {
/// Defined message key storing the route value.
public static let routeKey = "com.apple.container.xpc.route"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public actor SandboxService {
return message.reply()
}

// TODO: fix underying signal value to int64
// TODO: fix underlying signal value to int64
try await ctr.container.kill(Int32(try message.signal()))
return message.reply()
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/TerminalProgress/ProgressBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ extension ProgressBar {

if config.showProgressBar, total > 0, allowProgress {
let usedWidth = components.joined(separator: " ").count + 45 /* the maximum number of characters we may need */
let remainingWidth = max(config.width - usedWidth, 1 /* the minumum width of a progress bar */)
let remainingWidth = max(config.width - usedWidth, 1 /* the minimum width of a progress bar */)
let barLength = state.finished ? remainingWidth : Int(Int64(remainingWidth) * value / total)
let barPaddingLength = remainingWidth - barLength
let bar = "\(String(repeating: config.theme.bar, count: barLength))\(String(repeating: " ", count: barPaddingLength))"
Expand Down
4 changes: 2 additions & 2 deletions Sources/TerminalProgress/ProgressConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public struct ProgressConfig: Sendable {
public let width: Int
/// The theme of the progress bar.
public let theme: ProgressTheme
/// The flag indicating whether to clear the progress bar before reseting the cursor.
/// The flag indicating whether to clear the progress bar before resetting the cursor.
public let clearOnFinish: Bool
/// The flag indicating whether to update the progress bar.
public let disableProgressUpdates: Bool
Expand All @@ -86,7 +86,7 @@ public struct ProgressConfig: Sendable {
/// - totalSize: The initial total size of the progress bar. The default value is `nil`.
/// - width: The width of the progress bar in characters. The default value is `120`.
/// - theme: The theme of the progress bar. The default value is `nil`.
/// - clearOnFinish: The flag indicating whether to clear the progress bar before reseting the cursor. The default is `true`.
/// - clearOnFinish: The flag indicating whether to clear the progress bar before resetting the cursor. The default is `true`.
/// - disableProgressUpdates: The flag indicating whether to update the progress bar. The default is `false`.
public init(
terminal: FileHandle = .standardError,
Expand Down
2 changes: 1 addition & 1 deletion Tests/ContainerBuildTests/GlobberTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let testCases = [
func testGlobMatching(_ test: TestCase) throws {
let globber = Globber(URL(fileURLWithPath: "/"))
let found = try globber.glob(test.fileName, test.pattern)
#expect(found == test.expectSuccess, "expected found to be \(test.expectSuccess), instaed got \(found)")
#expect(found == test.expectSuccess, "expected found to be \(test.expectSuccess), instead got \(found)")
}

@Test("Invalid computed regex patterns throw error", arguments: errorGlobTestCases)
Expand Down