Skip to content

Commit 1eb8056

Browse files
committed
display the current file in the re-compile menu
1 parent 98a6659 commit 1eb8056

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

pybricksdev/cli/__init__.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async def reconnect_hub():
281281
response = await hub.race_disconnect(
282282
hub.race_power_button_press(
283283
questionary.select(
284-
"Would you like to re-compile your code?",
284+
f"Would you like to re-compile {os.path.basename(args.file.name)}?",
285285
response_options,
286286
default=(
287287
response_options[1]
@@ -294,13 +294,11 @@ async def reconnect_hub():
294294
with _get_script_path(args.file) as script_path:
295295
if response == response_options[0]:
296296
args.file = open(
297-
os.path.abspath(
298-
await hub.race_disconnect(
299-
hub.race_power_button_press(
300-
questionary.path(
301-
"What file would you like to use?"
302-
).ask_async()
303-
)
297+
await hub.race_disconnect(
298+
hub.race_power_button_press(
299+
questionary.path(
300+
"What file would you like to use?"
301+
).ask_async()
304302
)
305303
)
306304
)

0 commit comments

Comments
 (0)