Replies
|
It’s unlikely git is executed in the correct directory, which is why one would rather instantiate a Docs for how to invoke git, and here for the troubleshooting. Please feel free to keep posting into the closed issue for follow ups. |
|
Thanks for the response. |
|
The issue is resolved by removing Another issue comes up now. If the result of executing Any ideas to solve this? |
|
By the looks of it, there is no way to ignore a non-zero exit code nor does git grep allow to ignore empty results. As you are effectively executing the git program, maybe it’s easiest to call git yourself. |
Hi,
I am trying to execute a grep command with regex using the execute() function. A part of my code is:
I am getting the following error:
However, when I run
git grep --files-with-matches "config.isEnabled([[:space:]*]'async-payments'[[:space:]*])"in the command line, it works.I appreciate any help.
The issue is resolved by removing
\"from the"\"config.isEnabled([[:space:]*]'" + item + "'[[:space:]*])\"".Another issue comes up now. If the result of executing
grepfunction is empty, I am getting the same errorGitCommandError: Cmd('git') failed due to: exit code(1). When there is any result, it works fine.Any ideas to solve this?