This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 614
AutoUpdate Mac Installer Script Administrator privileges changes #656
Merged
nethip
merged 5 commits into
adobe:master
from
niteskum:AutoUpdateAdministratorPermissionChanges
Jul 24, 2018
Merged
AutoUpdate Mac Installer Script Administrator privileges changes #656
nethip
merged 5 commits into
adobe:master
from
niteskum:AutoUpdateAdministratorPermissionChanges
Jul 24, 2018
Conversation
This file contains 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
niteskum
changed the title
Auto update administrator permission changes
AutoUpdate Mac Installer Script Administrator privileges changes
Jun 15, 2018
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer an [NSString stringWithFormat:]
nethip
reviewed
Jun 21, 2018
appleScriptString = [appleScriptString stringByAppendingString:@" with administrator privileges"]; | ||
} | ||
|
||
NSAppleScript *theScript = [[NSAppleScript alloc] initWithSource:appleScriptString]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@niteskum Please address the review comments. |
nethip
approved these changes
Jul 16, 2018
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