Skip to content

Fix usage of sudo to edit file#1175

Merged
ben merged 1 commit intoprogit:masterfrom
rexkerr:sudo-usage-fix
Feb 14, 2019
Merged

Fix usage of sudo to edit file#1175
ben merged 1 commit intoprogit:masterfrom
rexkerr:sudo-usage-fix

Conversation

@rexkerr
Copy link
Copy Markdown
Contributor

@rexkerr rexkerr commented Feb 14, 2019

  • vim should not be run as root, but instead use sudo -e
    (or sudoedit) which creates a temporary copy of the file
    to edit and then copies it over the original if you modify the
    contents.

@rexkerr
Copy link
Copy Markdown
Contributor Author

rexkerr commented Feb 14, 2019

Using sudo -e also ensures that the users EDITOR is used rather than assuming vim.

vim should not be run as root, but instead use `sudo -e` (or sudoedit)
which creates a temporary copy of the file to edit and then copies it
over the original if you modify the contents.
@ben
Copy link
Copy Markdown
Member

ben commented Feb 14, 2019

I like it, thanks!

@ben ben merged commit c883d07 into progit:master Feb 14, 2019
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