-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Revert broken sed --in-place command #1521
Conversation
175d440
to
3e165b3
Compare
@mathbunnyru I'm usually not so aggressive about force-pushing, but I just can't bring myself to make a commit to remove a blank line. :) |
That's fine :) |
We also have the extraneous warnings from #1520... I'm wondering what's the best way to fix those. |
# /etc/ and we may not have write access. Apply sed on our own temp file: | ||
sed --expression="s/^jovyan:/nayvoj:/" /etc/passwd > /tmp/passwd | ||
echo "jovyan:x:$(id -u):$(id -g):,,,:/home/jovyan:/bin/bash" >> /tmp/passwd | ||
cat /tmp/passwd > /etc/passwd |
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.
That's quite a funny situation when we can't create a file in /etc
, but can completely overwrite an existing one.
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.
Ya... so /etc/passwd
has g+w
and jovyan
is in the root
group.
3e165b3
to
3a5c2ca
Compare
I think we pulled the trigger too early on that PR. Should have written tests first. Oh well. I think we should leave the false warnings in there for now. I don't have time to deal with them right away. I find the code before the PR more logical in this part. |
@maresb yeah, our testing is not the best, there are too many cases and shell scripts are not tested easily. So, what do you propose? |
Ya, let's do a quick merge here. We'll work on test cases and warnings later. |
Done |
❤️ 🎉 thanks for your work on making this land properly @maresb @mathbunnyru!! |
Partial fix for #1520