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

SudoWrite fails to write symlink (silently) #40

Closed
blueyed opened this issue Jan 18, 2016 · 5 comments
Closed

SudoWrite fails to write symlink (silently) #40

blueyed opened this issue Jan 18, 2016 · 5 comments

Comments

@blueyed
Copy link
Contributor

blueyed commented Jan 18, 2016

SudoWrite does not work with symlinks:

% echo foo > foo
% sudo chown root foo
% ln -s foo symlink
% vim -c 'norm o2' -c 'SudoWrite' -c q symlink
% cat foo
foo

The expected result would be to have "2" after "foo".

@chrisbra
Copy link
Owner

What happened to the symlinked file?

@blueyed
Copy link
Contributor Author

blueyed commented Jan 19, 2016

It stays intact, so after all the changes are more or less lost.
I have not checked the undofile etc.

@chrisbra
Copy link
Owner

BTW: I could not reproduce your issue. For me, it worked as expected, updating the file to which the symlink points to. This might be an issue with the shell, however.

@blueyed
Copy link
Contributor Author

blueyed commented Jan 30, 2016

Sorry, I was using SudoWrite from https://github.com/tpope/vim-eunuch accidentally.

@chrisbra
Copy link
Owner

That is kind of funny.

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

No branches or pull requests

2 participants