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

Tool seems to try to (re)write files that don't contain matches #102

Closed
08d2 opened this issue Dec 2, 2022 · 0 comments · Fixed by #103
Closed

Tool seems to try to (re)write files that don't contain matches #102

08d2 opened this issue Dec 2, 2022 · 0 comments · Fixed by #103

Comments

@08d2
Copy link

08d2 commented Dec 2, 2022

$ echo "hello world" > a.txt
$ echo "foo bar baz" > b.txt
$ chmod 400 b.txt
$ ruplacer 'hello' 'goodbye'
./a.txt:1 - hello world
./a.txt:1 + goodbye world

Would perform 1 replacement on 1 matching file
Re-run ruplacer with --go to write these changes to the filesystem
$ ruplacer 'hello' 'goodbye' --go
Error: Could not write ./b.txt

Caused by:
    Permission denied (os error 13)
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 a pull request may close this issue.

1 participant