Skip to content

Commit

Permalink
Fix order of environment setup and git module import
Browse files Browse the repository at this point in the history
The environment setup must happen before the `git` module is imported, otherwise GitPython won't be able to find the Git executable and raise an exception that causes the ClusterFuzz fuzzer runs to fail.
  • Loading branch information
DaveLak authored Aug 9, 2024
1 parent 27de867 commit bf2a112
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fuzzing/fuzz-targets/fuzz_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import tempfile
from configparser import ParsingError
from git import Repo, GitCommandError, InvalidGitRepositoryError
from utils import (
setup_git_environment,
handle_exception,
Expand All @@ -12,7 +11,7 @@

# Setup the git environment
setup_git_environment()

from git import Repo, GitCommandError, InvalidGitRepositoryError

def TestOneInput(data):
fdp = atheris.FuzzedDataProvider(data)
Expand Down

0 comments on commit bf2a112

Please sign in to comment.