Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executables installed by pipx not on PATH #2503

Open
juftin opened this issue Oct 24, 2024 · 0 comments
Open

Executables installed by pipx not on PATH #2503

juftin opened this issue Oct 24, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@juftin
Copy link

juftin commented Oct 24, 2024

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}

Link to GitHub repository

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

@juftin juftin added the kind/bug Something isn't working label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant