|
5 | 5 |
|
6 | 6 | import click |
7 | 7 | import pytz |
| 8 | +from repo_smith.repo_smith import create_repo_smith |
8 | 9 |
|
9 | 10 | from app.commands.check.git import git |
10 | 11 | from app.commands.check.github import github |
@@ -177,10 +178,12 @@ def _download_hands_on(hands_on: str, formatted_hands_on: str) -> None: |
177 | 178 | warn("Setup Github and Github CLI before downloading this hands-on") |
178 | 179 | exit(1) |
179 | 180 |
|
180 | | - hands_on_namespace.execute_function( |
181 | | - "download", |
182 | | - {"verbose": get_verbose()}, |
183 | | - ) |
| 181 | + verbose = get_verbose() |
| 182 | + with create_repo_smith(verbose, null_repo=True) as repo_smith: |
| 183 | + hands_on_namespace.execute_function( |
| 184 | + "download", |
| 185 | + {"rs": repo_smith, "verbose": verbose}, |
| 186 | + ) |
184 | 187 | success(f"Completed setting up {click.style(hands_on, bold=True, italic=True)}") |
185 | 188 |
|
186 | 189 |
|
@@ -251,10 +254,12 @@ def setup_exercise_folder( |
251 | 254 | empty_commit(initial_commit_message) |
252 | 255 |
|
253 | 256 | info("Executing download setup") |
254 | | - namespace.execute_function( |
255 | | - "setup", |
256 | | - {"verbose": get_verbose()}, |
257 | | - ) |
| 257 | + verbose = get_verbose() |
| 258 | + with create_repo_smith(verbose, existing_path=".") as repo_smith: |
| 259 | + namespace.execute_function( |
| 260 | + "setup", |
| 261 | + {"rs": repo_smith, "verbose": verbose}, |
| 262 | + ) |
258 | 263 |
|
259 | 264 | success(f"Completed setting up {click.style(exercise, bold=True, italic=True)}") |
260 | 265 | info("Start working on it:") |
|
0 commit comments