We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FreeBSD stat does not accept -c arguments... logs are showing;
root@redmine:/usr/local/www/redmine # cat log/git_hosting.log | grep stat 2017-08-24 18:06:52 +0000 [ERROR] Non-zero exit code pid 87308 exit 1 for `sudo -n -u git -i stat -c %a /git/local/hooks/common/post-receive` 2017-08-24 18:06:53 +0000 [ERROR] Non-zero exit code pid 87320 exit 1 for `sudo -n -u git -i stat -c %a /git/local/hooks/common/post-receive.d/mail_notifications` 2017-08-24 18:06:54 +0000 [ERROR] Non-zero exit code pid 87378 exit 1 for `sudo -n -u git -i stat -c %a /git/local/hooks/common/post-receive.d/git_multimail.py`
root@redmine:/usr/local/www/redmine # sudo -n -u git -i stat -c %a /git/local/hooks/common/post-receive.d/git_multimail.py stat: illegal option -- c usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file|handle ...]
The text was updated successfully, but these errors were encountered:
FreeBSD 11.1 amd64, redmine 3.4.2 redmine_bootstrap_kit 0.2.5 redmine_git_hosting 1.2.3
Sorry, something went wrong.
This one is fixed by this diff (not a good solution as this breaks linux)
diff --git a/lib/redmine_git_hosting/commands/sudo.rb b/lib/redmine_git_hosting/commands/sudo.rb index 65448567..72ac5975 100644 --- a/lib/redmine_git_hosting/commands/sudo.rb +++ b/lib/redmine_git_hosting/commands/sudo.rb @@ -137,7 +137,7 @@ module RedmineGitHosting # Test if file permissions has changed # def sudo_file_perms_changed?(filemode, dest_file) - current_mode = sudo_capture('stat', '-c', "%a", dest_file) + current_mode = sudo_capture('stat', '-f', "%Mp%Lp", dest_file) current_mode.chomp != filemode rescue RedmineGitHosting::Error::GitoliteCommandException => e logger.error(e.output)
the problem may be the same on macos and other *BSD … (tested on OpenBSD)
Thanks for your feedback!
As discussed in #732 (comment), issues related to Redmine < 4.0 or severely outdated issues are being closed to help clean up the issue tracker.
If this issue is still relevant to you and you are running Redmine >= 4.0, please open a new issue including all new relevant information.
n-rodriguez
No branches or pull requests
FreeBSD stat does not accept -c arguments...
logs are showing;
The text was updated successfully, but these errors were encountered: