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

"find: ./.Trash: operation not permitted" appearing when run in home folder #55

Closed
nbbaier opened this issue Mar 16, 2023 · 3 comments
Closed

Comments

@nbbaier
Copy link

nbbaier commented Mar 16, 2023

When I run the script in my home folder, I get the following type of output:

find: ./.Trash: Operation not permitted
./repo1: Needs push (main) Uncommitted changes
./repo2: Needs push (master) Uncommitted changes
...

I'm wondering if there's a way to change this behavior so that first line doesn't show up?

@fboender
Copy link
Owner

Wild guess, but perhaps this is related to this question on Stackoverflow? (Don't use the solution given in that question, it's a bad idea). Can you confirm that you're on mac?

@nbbaier
Copy link
Author

nbbaier commented Mar 16, 2023

I am on a Mac, yes. And I get the same operation not permitted warning with ls ~/.Trash

@fboender
Copy link
Owner

I've looked into it, but there doesn't seem to be a POSIX (cross platform / shell) way to exclude such directories. It is possible to exclude the .Trash dir itself, however find will still try to recurse into the directory and still runs into the problem. So I can't fix this in mgitstatus itself.

Unfortunately, I think the only solutions for you are to either create an alias in your shell profile that redirects the error output to /dev/null:

alias mgitstatus="mgitstatus 2>/dev/null"

Or move the Git projects to a sub folder in your home dir like ~/src or ~/projects.

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