voidzero-dev/setup-vp

Vite+ install.sh always warns about unwritable .bashrc/.profile on self-hosted ARC runners (harmless but noisy)

开放

#87 创建于 2026年6月23日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (11 个派生)github user discovery
good first issue

仓库指标

星标
 (91 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Summary

On self-hosted GitHub Actions runners (Actions Runner Controller / Kubernetes), every run of setup-vp produces two warnings from the Vite+ installer:

warn: Cannot write to /home/runner/.bashrc (permission denied), skipping.
warn: Cannot write to /home/runner/.profile (permission denied), skipping.

Install still succeeds (✓ VITE+ successfully installed!) and later workflow steps work because setup-vp adds ~/.vite-plus/bin via GitHub Actions addPath() after install. The warnings are cosmetic but appear on every job, which makes CI logs look like something failed when it did not.

Environment

  • Runner: ARC scale-set mode on k3s (org self-hosted, linux/arm64)
  • Runner image: ghcr.io/actions/actions-runner:2.335.1 (official image, ephemeral pod per job)
  • Action: voidzero-dev/setup-vp (local composite action wrapping the install script)
  • Install command (from action): curl -fsSL … https://viteplus.dev/install.sh | bash
  • CI env: CI=true is set by GitHub Actions

Reproduction

  1. Run any workflow on a self-hosted runner using the official actions-runner container image.
  2. Use setup-vp (directly or via a composite action that calls it).
  3. Observe the install step logs.

Root cause

install.sh always runs configure_shell_path(), which tries to append a source line to existing shell rc files (~/.bashrc, ~/.profile, etc.). On the official actions-runner image those files exist but are not writable by the runner user (uid 1001). The installer correctly warns and skips (see voidzero-dev/vite-plus#1040).

In GitHub Actions, persisting PATH via shell rc files is unnecessary anyway — setup-vp already handles this in install-viteplus.ts:

function ensureVitePlusBinInPath(): void {
  const binDir = join(getVitePlusHome(), "bin")
  if (!process.env.PATH?.includes(binDir)) {
    addPath(binDir)
  }
}

Expected vs actual

Expected Actual
Vite+ install Success Success ✓
vp on PATH in later steps Yes Yes ✓
CI log noise None (or documented as benign) Two warnings every job

Suggested improvements

Any of these would help CI users; happy to PR if you prefer a particular direction:

  1. Document in the README that these warnings are expected and harmless on GitHub-hosted/self-hosted CI when using setup-vp, since PATH is set via $GITHUB_PATH.

  2. Skip shell rc configuration in CI — either:

    • Pass an env var to install.sh before install (e.g. VP_SKIP_SHELL_CONFIG=1) if/when vite-plus supports it, or
    • Coordinate an upstream change in vite-plus to skip configure_shell_path() when CI=true (node manager already auto-enables in CI; shell rc patching does not add value there).
  3. Filter known-benign warnings in the action output when install exits 0 and addPath ran successfully, so consumers are not misled by yellow log lines.

Workaround today

Ignore the warnings — they do not affect functionality when using setup-vp.


Reported from a k3s ARC deployment (actions-runner ephemeral pods on ARM64). Same behavior should reproduce on any self-hosted runner using the official runner container image, not specific to Kubernetes.

贡献者指南