Skip to content

Commit

Permalink
oss_fuzz_checkout: avoid breaking on permission errors (#202)
Browse files Browse the repository at this point in the history
Supersedes: #193

Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski authored Apr 3, 2024
1 parent 07a7690 commit 8ff666e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions experiment/oss_fuzz_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import yaml

BUILD_DIR: str = 'build'
GLOBAL_TEMP_DIR: tempfile.TemporaryDirectory
GLOBAL_TEMP_DIR: str = ''
# Assume OSS-Fuzz is at repo root dir by default.
# This will change if temp_dir is used.
OSS_FUZZ_DIR: str = os.path.join(
Expand All @@ -52,9 +52,9 @@ def _set_temp_oss_fuzz_repo():
# Holding the temp directory in a global object to ensure it won't be deleted
# before program ends.
global GLOBAL_TEMP_DIR
GLOBAL_TEMP_DIR = tempfile.TemporaryDirectory()
GLOBAL_TEMP_DIR = tempfile.mkdtemp()
global OSS_FUZZ_DIR
OSS_FUZZ_DIR = GLOBAL_TEMP_DIR.name
OSS_FUZZ_DIR = GLOBAL_TEMP_DIR
atexit.register(_remove_temp_oss_fuzz_repo)
_clone_oss_fuzz_repo()

Expand Down

0 comments on commit 8ff666e

Please sign in to comment.