Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure when running Non-System Apple Software Updates #214

Closed
wants to merge 1 commit into from

Conversation

kenchan0130
Copy link

@kenchan0130 kenchan0130 commented Mar 26, 2024

When using launchctl asuser with sudo, it's necessary to specify the username using the -u option.

The script does not pass the options correctly, so the softwareupdate command did not work correctly.

Fix #177

@Macjutsu
Copy link
Owner

I finally got around to testing this...

First sudo -i is correct for when there is no current user. It's essentially the same as sudo -u root... https://unix.stackexchange.com/questions/34670/is-there-a-difference-between-sudo-su-root-and-sudo-u-root-h-bin-bash

Second, in my testing, when a user is logged in, I can not confirm that sudo -u "${current_user_account_name}" works any better than sudo -i. (In other words, both methods work in my testing when a user is logged in.) However, if you claim that sudo -u "${current_user_account_name}" works better in your tests then I'll put it in the next beta release (with credit to you)... thanks!

Because I've already moved on to betas for super v4.1 I'm gonna close this request without a merge.

@Macjutsu Macjutsu closed this May 17, 2024
@kenchan0130 kenchan0130 deleted the fix-177 branch July 30, 2024 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure when running Non-System Apple Software Updates
2 participants