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 macos install #67

Merged
merged 7 commits into from
Oct 22, 2024
Merged

Fix macos install #67

merged 7 commits into from
Oct 22, 2024

Conversation

cooperq
Copy link
Collaborator

@cooperq cooperq commented Oct 21, 2024

No description provided.

Copy link
Collaborator

@wgreenberg wgreenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few fixes!

dist/install-common.sh Outdated Show resolved Hide resolved
do
sleep 1
done
}

wait_for_adb_shell() {
until adb shell true 2> /dev/null
until $ADB shell true 2> /dev/null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's usually good practice to wrap variables-in-commands in double quotes, otherwise all manner of chaos can happen if a space or * get into the variable. instead of find/replacing all instances of adb with $ADB, might be easier to make a _adb_shell function like i did with _adb_push

@@ -86,7 +82,7 @@ setup_rayhunter() {

test_rayhunter() {
URL="http://localhost:8080"
adb forward tcp:8080 tcp:8080 > /dev/null
$ADB forward tcp:8080 tcp:8080 > /dev/null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto here, double quotes would probably be a good idea

Comment on lines 19 to 23
let gids = &[
Gid::from_raw(3003), // AID_INET
Gid::from_raw(3004), // AID_NET_RAW
];
nix::unistd::setgroups(gids).expect("setgroups failed");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indent

Co-authored-by: Will Greenberg <[email protected]>
@wgreenberg wgreenberg merged commit ee75326 into main Oct 22, 2024
1 check passed
@wgreenberg wgreenberg deleted the fix-macos-install branch October 22, 2024 19:21
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.

2 participants