Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/desktop/build/bin/kanban
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
RESOURCES_DIR="$(dirname "$SCRIPT_DIR")"
CLI_ENTRY="$RESOURCES_DIR/app.asar.unpacked/cli/cli.js"

# Runtime-update override. The desktop orchestrator pre-validates the
# path; we fail loudly on a missing file rather than silently falling
# back, so the parent's rollback bookkeeping stays in sync with what
# actually ran.
if [ -n "$KANBAN_CLI_OVERRIDE" ]; then
if [ ! -f "$KANBAN_CLI_OVERRIDE" ]; then
echo "error: KANBAN_CLI_OVERRIDE points to missing file: $KANBAN_CLI_OVERRIDE" >&2
exit 1
fi
CLI_ENTRY="$KANBAN_CLI_OVERRIDE"
fi

if [ ! -f "$CLI_ENTRY" ]; then
echo "error: Kanban CLI not found at $CLI_ENTRY" >&2
exit 1
Expand Down
11 changes: 11 additions & 0 deletions packages/desktop/build/bin/kanban.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ set "SCRIPT_DIR=%~dp0"
set "RESOURCES_DIR=%SCRIPT_DIR%.."
set "CLI_ENTRY=%RESOURCES_DIR%\app.asar.unpacked\cli\cli.js"

REM Runtime-update override (see POSIX shim for rationale): fail loud
REM on missing file rather than silently falling back to bundled.
if defined KANBAN_CLI_OVERRIDE (
if not exist "%KANBAN_CLI_OVERRIDE%" (
echo error: KANBAN_CLI_OVERRIDE points to missing file: %KANBAN_CLI_OVERRIDE% >&2
endlocal
exit /b 1
)
set "CLI_ENTRY=%KANBAN_CLI_OVERRIDE%"
)

REM Windows packaged layout:
REM Kanban\resources\bin\kanban.cmd (this file)
REM RESOURCES_DIR = Kanban\resources
Expand Down
Loading
Loading