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

PHPCBF can't change files outside of home directory #4

Open
jhaagsma opened this issue Jul 14, 2016 · 1 comment
Open

PHPCBF can't change files outside of home directory #4

jhaagsma opened this issue Jul 14, 2016 · 1 comment

Comments

@jhaagsma
Copy link

Firstly, thanks for this plugin!

So I'm working on a repository that's not in my home directory. I can sniff it with Sniff this file, but I can't use phpcbf to fix it.

I tried copying the file to my home folder and changing its permissions to be owned by me, and that worked fine. I copied it back to the other folder /home/different_user with my permissions preserved and I still couldn't changed it. On the chance that it was the folder permissions, I changed ownership of the other home folder to myself and it still wouldn't work.

So, I have two identical files, one in my home folder, one in a different home folder (both the other home folder and file owned by me, with identical permissions), and I can only change the one in my home folder.

I glanced at the source, but didn't see anything obvious that would lead to that.

@gsherwood
Copy link
Member

gsherwood commented Jul 14, 2016

PHPCBF doesn't care where files are stored. Yes, permissions need to be correct for it to be able to read and overwrite a file, but that's all.

You sound like you are using an IDE plugin, which I don't maintain. I'd be interested to know what output you get from the PHPCBF command if you run it directly on the command line and specify the correct coding standard for it to use. Maybe you'll get some output that tells you what is wrong, or maybe you'll find that whatever plugin you are using is not sending the right command. I'm honestly not sure.

Edit: sorry, I thought this was a different repo. I don't maintain this plugin personally, but I'm still interested to know if you can run PHPCBF directly on the command line.

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