Skip to content

Commit

Permalink
main.m: log success message if set-permission succeeded (debug).
Browse files Browse the repository at this point in the history
  • Loading branch information
asafkorem committed Oct 30, 2022
1 parent a752c40 commit 122ad3b
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions applesimutils/applesimutils/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -351,17 +351,20 @@ static BOOL performPermissionsPass(NSString* permissionsArgument, NSString* simu
}
}];

if(success == NO)
{
if(err == nil)
{
err = [NSError errorWithDomain:@"AppleSimUtilsError" code:0 userInfo:@{NSLocalizedDescriptionKey: @"Unknown permission pass error"}];
}

LNUsagePrintMessage([NSString stringWithFormat:@"Error: %@.", err.localizedDescription], LNLogLevelError);
exit(-3);
}

if(success) {
LNUsagePrintMessage(
[NSString stringWithFormat:@"Permissions settings performed successfully: %@.",
permissionsArgument],
LNLogLevelDebug);
} else {
if(err == nil) {
err = [NSError errorWithDomain:@"AppleSimUtilsError" code:0 userInfo:@{NSLocalizedDescriptionKey: @"Unknown permission pass error"}];
}

LNUsagePrintMessage([NSString stringWithFormat:@"Error: %@.", err.localizedDescription], LNLogLevelError);
exit(-3);
}

return needsSpringBoardRestart;
}

Expand Down

0 comments on commit 122ad3b

Please sign in to comment.