Skip to content

Commit 07a75c4

Browse files
authored
post_create: skip the install hint when deps already installed (#91)
The 'uv sync' next-step is redundant when the LiveKit CLI already ran the install task during `lk agent init --install`. Move it into a guarded subtask that is skipped when LIVEKIT_DEPS_INSTALLED is set (the CLI sets it on a successful install), matching the existing status-guard pattern used for LIVEKIT_AGENT_NAME and LIVEKIT_SANDBOX_ID.
1 parent 9bf4404 commit 07a75c4

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

taskfile.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ tasks:
2121
- task: set_agent_name_if_present
2222
- task: help_open_sandbox_if_present
2323

24+
help_install_hint_if_needed:
25+
desc: "Print the local install hint, unless the CLI already installed dependencies"
26+
status:
27+
# Skip when `lk agent init --install` already ran the install task.
28+
- test -n "$LIVEKIT_DEPS_INSTALLED"
29+
cmds:
30+
- echo '{{ indent .INDENT "uv sync" }}'
31+
2432
set_agent_name_if_present:
2533
status:
2634
- test -z "$LIVEKIT_AGENT_NAME"
@@ -42,7 +50,7 @@ tasks:
4250
- echo 'To try your new agent directly in your terminal:'
4351
- echo ''
4452
- echo '{{ indent .INDENT "cd" }} {{ .REL_PATH }}'
45-
- echo '{{ indent .INDENT "uv sync" }}'
53+
- task: help_install_hint_if_needed
4654
- echo '{{ indent .INDENT "uv run" }} {{ .PYTHON_MAIN }} console'
4755

4856
help_open_web_console:
@@ -55,7 +63,7 @@ tasks:
5563
- echo 'To try your new agent in the web console:'
5664
- echo ''
5765
- echo '{{ indent .INDENT "cd" }} {{ .REL_PATH }}'
58-
- echo '{{ indent .INDENT "uv sync" }}'
66+
- task: help_install_hint_if_needed
5967
- echo '{{ indent .INDENT "uv run" }} {{ .PYTHON_MAIN }} dev'
6068
- echo ''
6169
- echo 'Then visit:'

0 commit comments

Comments
 (0)