From cb0cbb76ed440f6527a6079aabc6926cebd6bf07 Mon Sep 17 00:00:00 2001 From: Ian Taylor Date: Tue, 15 Mar 2022 16:09:44 -0700 Subject: [PATCH] Quote the chmod for mac --- Readme.md | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 5b30362..4ffd433 100644 --- a/Readme.md +++ b/Readme.md @@ -11,7 +11,7 @@ We need to give your user permission to modify the /etc/hosts file. This is don On MacOS, run in terminal: ```sh -chmod +a user:$(whoami) allow read,write,append,readattr,writeattr,readextattr,writeextattr,readsecurity /etc/hosts +chmod +a "user:$(whoami) allow read,write,append,readattr,writeattr,readextattr,writeextattr,readsecurity" /etc/hosts ``` On Windows... Powershell is too complex for me to understand how to do it as a script, so in the UI: diff --git a/src/main.rs b/src/main.rs index be67993..cbba6df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,7 +96,7 @@ Make sure of the following: 2. You are running as a user who has access to the file 3. On Mac and Windows, the `etc/hosts` file is protected by ACLs. You will need to set an ACL setting to allow your user to modify the the file. On Mac this can be done by running this command: - `chmod +a user:$(whoami) allow read,write,append,readattr,writeattr,readextattr,writeextattr,readsecurity /etc/hosts` + `chmod +a \"user:$(whoami) allow read,write,append,readattr,writeattr,readextattr,writeextattr,readsecurity\" /etc/hosts` See the readme.md for windows directions If you wish to use a different path, set the `HOST_FILE_LOCATION` env var or pass the `-h` argument.