Skip to content

Commit b1c3e6f

Browse files
committed
fix setup command
1 parent 0ee354c commit b1c3e6f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

gitbug-java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,10 @@ class GitBugJavaCli(object):
9393
if not gitbug.exists():
9494
self.__download(download_url, gitbug)
9595
# Extract the dataset
96-
with tarfile.open(gitbug) as tar:
97-
tar.extractall("data")
98-
9996
data_dir = Path(get_project_root(), "data")
10097
source = os.path.join(data_dir, f"{name}")
98+
with tarfile.open(gitbug) as tar:
99+
tar.extractall(source)
101100
shutil.copytree(source, data_dir, dirs_exist_ok=True)
102101
shutil.rmtree(source)
103102
os.remove(gitbug)
@@ -108,10 +107,12 @@ class GitBugJavaCli(object):
108107
if not act_cache.exists():
109108
self.__download(download_url, act_cache)
110109
# Extract the zip
111-
Path("./act-cache").mkdir(parents=True, exist_ok=True)
112-
with zipfile.ZipFile(f"{name}.zip", "r") as zip_ref:
113-
zip_ref.extractall("./act-cache")
114-
os.remove(f"{name}.zip")
110+
zip_path = Path(get_project_root(), "act-cache.zip")
111+
cache_path = Path(get_project_root(), "act-cache")
112+
cache_path.mkdir(parents=True, exist_ok=True)
113+
with zipfile.ZipFile(zip_path, "r") as zip_ref:
114+
zip_ref.extractall(cache_path)
115+
os.remove(zip_path)
115116

116117
def pids(self):
117118
"""

0 commit comments

Comments
 (0)