Skip to content

Commit 01150a0

Browse files
authored
post_create: skip the install hint when deps already installed (#55)
The 'pnpm install' 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 3b719ec commit 01150a0

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

taskfile.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tasks:
1414
- echo 'To run the new agent locally:'
1515
- echo ''
1616
- echo '{{ indent .INDENT "cd" }} {{ .REL_PATH }}'
17-
- echo '{{ indent .INDENT "pnpm install" }}'
17+
- task: help_install_hint_if_needed
1818
- echo '{{ indent .INDENT "pnpm dev" }}'
1919
- echo ''
2020
- task: help_open_web_console
@@ -25,6 +25,14 @@ tasks:
2525
- task: set_agent_name_if_present
2626
- task: help_open_sandbox_if_present
2727

28+
help_install_hint_if_needed:
29+
desc: "Print the local install hint, unless the CLI already installed dependencies"
30+
status:
31+
# Skip when `lk agent init --install` already ran the install task.
32+
- test -n "$LIVEKIT_DEPS_INSTALLED"
33+
cmds:
34+
- echo '{{ indent .INDENT "pnpm install" }}'
35+
2836
set_agent_name_if_present:
2937
desc: "When LIVEKIT_AGENT_NAME is set, configure the agent to use it on init"
3038
status:

0 commit comments

Comments
 (0)