mirror of
https://github.com/mas-cli/mas
synced 2025-02-16 12:38:30 +00:00
🎁 Unwrap optional to get rid of string interpolation warning and force unwrap
This commit is contained in:
parent
e0239860f4
commit
ceed994319
1 changed files with 7 additions and 6 deletions
|
@ -58,12 +58,13 @@ struct ResetCommand: CommandProtocol {
|
|||
}
|
||||
|
||||
// Wipe Download Directory
|
||||
let directory = CKDownloadDirectory(nil)
|
||||
do {
|
||||
try FileManager.default.removeItem(atPath: directory!)
|
||||
} catch {
|
||||
if options.debug {
|
||||
printError("removeItemAtPath:\"\(directory)\" failed, \(error)")
|
||||
if let directory = CKDownloadDirectory(nil) {
|
||||
do {
|
||||
try FileManager.default.removeItem(atPath: directory)
|
||||
} catch {
|
||||
if options.debug {
|
||||
printError("removeItemAtPath:\"\(directory)\" failed, \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue