-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
readme: fix sed
expression
#1336
Conversation
My guess is that you're using GNU sed as opposed to the BSD sed that comes with macOS. This command works fine with the macOS sed |
We could also update the command to be
which works with both BSD and GNU sed |
b7c7067
to
6142285
Compare
@Samasaur1: I didn't install any version of sed specifically. I'm just switching from linux to os x today and I'm still in the process of installing stuff. Anyway, I changed my commit to follow your suggestion. |
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.
You're still missing the -e
option
@@ -53,7 +53,7 @@ nix flake init -t nix-darwin/master | |||
# To use Nixpkgs 24.11: | |||
nix flake init -t nix-darwin/nix-darwin-24.11 | |||
|
|||
sed -i '' "s/simple/$(scutil --get LocalHostName)/" flake.nix | |||
sed -i'' "s/simple/$(scutil --get LocalHostName)/" flake.nix |
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.
sed -i'' "s/simple/$(scutil --get LocalHostName)/" flake.nix | |
sed -i'' -e "s/simple/$(scutil --get LocalHostName)/" flake.nix |
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.
@DamienCassou I think it's still missing the -e
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''
is incorrect for macOS’s default BSD sed. It needs to be -i ''
or you get a flake.nix-e
file.
6142285
to
11def50
Compare
I don't see any way to make a command that works in all cases. I am therefore closing the PR. Feel free to reopen if you see a way forward. |
No description provided.