[GH-ISSUE #2503] Executables installed by pipx not on PATH #1156

Open
opened 2026-03-01 21:49:22 +03:00 by kerem · 1 comment
Owner

Originally created by @juftin on GitHub (Oct 24, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2503

Bug report info

act version:            0.2.68
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 14
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
	$HOME/.docker/run/docker.sock
Config files:           
	/Users/justinflannery/Library/Application Support/act/actrc:
		-P ubuntu-latest=catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.23.1
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-ldflags:             -X main.version=0.2.68
		DefaultGODEBUG:       asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               arm64
		GOOS:                 darwin
		GOARM64:              v8.0
Docker Engine:
	Engine version:        27.2.0
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         cgroupfs
	Storage driver:        overlayfs
	Registry URI:          https://index.docker.io/v1/
	OS:                    Docker Desktop
	OS type:               linux
	OS version:            
	OS arch:               aarch64
	OS kernel:             6.10.4-linuxkit
	OS CPU:                14
	OS memory:             36021 MB
	Security options:
		name=seccomp,profile=unconfined
		name=cgroupns

Command used with act

act --container-architecture linux/amd64 --job ruff

Describe issue

I'm using pipx in my GitHub Actions workflows but it doesn't work in act because /root/.local/.bin isn't on the PATH

And here is the fix that actually makes the executables installed by pipx available:

- name: Add pipx to PATH
  if: github.actor == 'nektos/act'
  run: echo "/root/.local/bin" >> ${GITHUB_PATH}

No response

Workflow content

name: Lint Python

on:
  pull_request:
    paths:
      - "**/*.py"

jobs:
  ruff:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository code
        uses: actions/checkout@v4

      - name: Set up python environment
        id: python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install dependencies
        run: pipx install ruff==0.4.5
        env:
          PIPX_DEFAULT_PYTHON: ${{ steps.python.outputs.python-path }}

      - name: Run Ruff
        id: ruff
        run: |
          ruff check . --output-format github
          ruff format --check --exclude "*.ipynb"

Relevant log output

| ⚠️  Note: '/root/.local/bin' is not on
|     your PATH environment variable.
|     These apps will not be globally
|     accessible until your PATH is
|     updated. Run `pipx ensurepath` to
|     automatically add it, or manually
|     modify your PATH in your shell's
|     config file (i.e. ~/.bashrc).
...
exitcode '127': command not found, please refer to https://github.com/nektos/act/issues/107 for more information

Additional information

No response

Originally created by @juftin on GitHub (Oct 24, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2503 ### Bug report info ```plain text act version: 0.2.68 GOOS: darwin GOARCH: arm64 NumCPU: 14 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock $HOME/.docker/run/docker.sock Config files: /Users/justinflannery/Library/Application Support/act/actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.23.1 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.68 DefaultGODEBUG: asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: arm64 GOOS: darwin GOARM64: v8.0 Docker Engine: Engine version: 27.2.0 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlayfs Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: aarch64 OS kernel: 6.10.4-linuxkit OS CPU: 14 OS memory: 36021 MB Security options: name=seccomp,profile=unconfined name=cgroupns ``` ### Command used with act ```sh act --container-architecture linux/amd64 --job ruff ``` ### Describe issue I'm using `pipx` in my GitHub Actions workflows but it doesn't work in `act` because `/root/.local/.bin` isn't on the PATH And here is the fix that actually makes the executables installed by `pipx` available: ```yaml - name: Add pipx to PATH if: github.actor == 'nektos/act' run: echo "/root/.local/bin" >> ${GITHUB_PATH} ``` ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Lint Python on: pull_request: paths: - "**/*.py" jobs: ruff: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v4 - name: Set up python environment id: python uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install dependencies run: pipx install ruff==0.4.5 env: PIPX_DEFAULT_PYTHON: ${{ steps.python.outputs.python-path }} - name: Run Ruff id: ruff run: | ruff check . --output-format github ruff format --check --exclude "*.ipynb" ``` ### Relevant log output ```sh | ⚠️ Note: '/root/.local/bin' is not on | your PATH environment variable. | These apps will not be globally | accessible until your PATH is | updated. Run `pipx ensurepath` to | automatically add it, or manually | modify your PATH in your shell's | config file (i.e. ~/.bashrc). ... exitcode '127': command not found, please refer to https://github.com/nektos/act/issues/107 for more information ``` ### Additional information _No response_
Author
Owner

@github-actions[bot] commented on GitHub (Apr 23, 2025):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:2822757537 --> @github-actions[bot] commented on GitHub (Apr 23, 2025): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1156
No description provided.