Skip to content

Commit

Permalink
jbr-debug-access-right-test
Browse files Browse the repository at this point in the history
  • Loading branch information
wartraxx51 committed Jan 10, 2025
1 parent 1e3db93 commit 4767f88
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions infrahub_sdk/testing/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import asyncio
import shutil
import os
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
Expand Down Expand Up @@ -60,18 +59,17 @@ def path(self) -> str:

def init(self) -> None:
self.dst_directory.mkdir(parents=True, exist_ok=True)
os.chmod(self.dst_directory, 0o777)


dest_path = self.dst_directory / self.name
if dest_path.exists():
shutil.rmtree(dest_path)

dest = shutil.copytree(
src=self.src_directory,
dst=dest_path,
ignore=shutil.ignore_patterns(".git", *self.directories_to_ignore),
)

dest_path.chmod(0o755)
print(dest)

self._repo = GitRepoManager(str(Path(self.dst_directory / self.name)), branch=self.initial_branch)
Expand Down

0 comments on commit 4767f88

Please sign in to comment.