Improve access control.

Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
Ross Goldberg 2024-10-21 07:40:14 -04:00
parent 490ee2d338
commit 586de07389
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -56,7 +56,7 @@ extension Mas {
/// - appID: App identifier /// - appID: App identifier
/// - appLibrary: Library of installed apps /// - appLibrary: Library of installed apps
/// - Throws: Any error that occurs while attempting to install the app. /// - Throws: Any error that occurs while attempting to install the app.
fileprivate func install(appID: AppID, appLibrary: AppLibrary) throws { private func install(appID: AppID, appLibrary: AppLibrary) throws {
// Try to download applications with given identifiers and collect results // Try to download applications with given identifiers and collect results
if let product = appLibrary.installedApp(withAppID: appID), !force { if let product = appLibrary.installedApp(withAppID: appID), !force {
printWarning("\(product.appName) is already installed") printWarning("\(product.appName) is already installed")

View file

@ -13,15 +13,15 @@ import XCTest
class MASErrorTestCase: XCTestCase { class MASErrorTestCase: XCTestCase {
private let errorDomain = "MAS" private let errorDomain = "MAS"
var error: MASError! private var error: MASError!
var nserror: NSError! private var nserror: NSError!
/// Convenience property for setting the value which will be use for the localized description /// Convenience property for setting the value which will be use for the localized description
/// value of the next NSError created. /// value of the next NSError created.
/// ///
/// Only used when the NSError does not have a user info /// Only used when the NSError does not have a user info
/// entry for localized description. /// entry for localized description.
var localizedDescription: String { private var localizedDescription: String {
get { "dummy value" } get { "dummy value" }
set { set {
NSError.setUserInfoValueProvider(forDomain: errorDomain) { _, _ in NSError.setUserInfoValueProvider(forDomain: errorDomain) { _, _ in

View file

@ -11,7 +11,7 @@ import XCTest
@testable import mas @testable import mas
class NetworkManagerTests: XCTestCase { class NetworkManagerTests: XCTestCase {
override public func setUp() { override func setUp() {
super.setUp() super.setUp()
Mas.initialize() Mas.initialize()
} }