This repository was archived by the owner on Sep 2, 2021. It is now read-only.
AutoUpdate Mac Installer Script Administrator privileges changes#656
Merged
nethip merged 5 commits intoadobe:masterfrom Jul 24, 2018
niteskum:AutoUpdateAdministratorPermissionChanges
Merged
AutoUpdate Mac Installer Script Administrator privileges changes#656nethip merged 5 commits intoadobe:masterfrom niteskum:AutoUpdateAdministratorPermissionChanges
nethip merged 5 commits intoadobe:masterfrom
niteskum:AutoUpdateAdministratorPermissionChanges
Conversation
nethip
reviewed
Jun 21, 2018
appshell/update_mac.mm
Outdated
| pArgs = [NSArray arrayWithObjects:shPath, scriptPath, @"-a", bracketsAppName, @"-b", installDir, @"-l", logFilePath, @"-m", mountPoint, @"-t", updateDir, @"-p", pidString, @"&", nil]; | ||
|
|
||
| retval = RunScript(nohupPath, pArgs, false); | ||
| BOOL isAdmin = false; |
Contributor
There was a problem hiding this comment.
BOOL isAdmin = NO or bool isAdmin = false
nethip
reviewed
Jun 21, 2018
appshell/update_mac.mm
Outdated
| /*Build the Apple Script String*/ | ||
| NSAppleEventDescriptor *returnDescriptor = NULL; | ||
| NSString * appleScriptString = @"do shell script \""; | ||
| appleScriptString = [appleScriptString stringByAppendingString:nohupPath]; |
Contributor
There was a problem hiding this comment.
I would prefer an [NSString stringWithFormat:]
nethip
reviewed
Jun 21, 2018
| appleScriptString = [appleScriptString stringByAppendingString:@" with administrator privileges"]; | ||
| } | ||
|
|
||
| NSAppleScript *theScript = [[NSAppleScript alloc] initWithSource:appleScriptString]; |
Contributor
There was a problem hiding this comment.
theScript string needs be freed. But anyways since this in the destruction sequence I guess we can live with it.
nethip
approved these changes
Jun 21, 2018
Contributor
|
@niteskum Please address the review comments. |
nethip
approved these changes
Jul 16, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ping @vickramdhawal @nethip @mbhavi @swmitra for review.
This PR include Fix for adobe/brackets#14417
In this PR I have wrapped update.sh script in applescript and running from RunAppUpdate Function.
AppleScript runs update.sh script in elevated mode for non-admin user