mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-25 23:55:56 +03:00
[GH-ISSUE #1538] GitProcessor: run git branch from a specified directory instead of working directory #655
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#655
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @root-talis on GitHub (Mar 10, 2021).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1538
When running a script from cron it is very possible that the working directory will not match the script directory. In this case, instead of logging the git version, GitProcessor logs this:
This happens every time something is logged. Not only this is unhelpful, but it is also annoying because analyzing such logs becomes an issue:
fatalis a keyword by which one might want to filter their logs.It would be nice to make it possible to specify the directory in which
git branchshould be run, for example via a configuration value passed to the constructor.@Seldaek commented on GitHub (Apr 4, 2021):
I guess as a workaround you could make sure to call $gitProcessor([]) early in your process before you change the directory, to make sure the cache is populated.
But otherwise if you like to send a PR adding a new $path option, that sounds good to me.