mirror of
https://github.com/apple/container.git
synced 2026-09-23 16:15:37 +00:00
Fix typos (#122)
Hi there, some small typos I fixed using [`typos`](https://github.com/crate-ci/typos). Cheers, Patrick
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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))"
|
||||
|
||||
@@ -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
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user