From e6d4d286152cd9e5813373ef1ce3f8d74b9a29e7 Mon Sep 17 00:00:00 2001 From: Jason Lernerman Date: Wed, 24 Jun 2026 08:44:02 -0400 Subject: [PATCH] post_create: skip the install hint when deps already installed 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. --- taskfile.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/taskfile.yaml b/taskfile.yaml index 7d6f23b..726820e 100644 --- a/taskfile.yaml +++ b/taskfile.yaml @@ -14,7 +14,7 @@ tasks: - echo 'To run the new agent locally:' - echo '' - echo '{{ indent .INDENT "cd" }} {{ .REL_PATH }}' - - echo '{{ indent .INDENT "pnpm install" }}' + - task: help_install_hint_if_needed - echo '{{ indent .INDENT "pnpm download-files" }}' - echo '{{ indent .INDENT "pnpm dev" }}' - echo '' @@ -26,6 +26,14 @@ tasks: - task: set_agent_name_if_present - task: help_open_sandbox_if_present + help_install_hint_if_needed: + desc: "Print the local install hint, unless the CLI already installed dependencies" + status: + # Skip when `lk agent init --install` already ran the install task. + - test -n "$LIVEKIT_DEPS_INSTALLED" + cmds: + - echo '{{ indent .INDENT "pnpm install" }}' + set_agent_name_if_present: desc: "When LIVEKIT_AGENT_NAME is set, configure the agent to use it on init" status: