[GH-ISSUE #2725] Failed to find PATH using curl and uv #1232

Closed
opened 2026-03-01 21:49:50 +03:00 by kerem · 0 comments
Owner

Originally created by @namgyu-youn on GitHub (Apr 9, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2725

I did a quick search on existing issues but didn't find one that matched what I want. Apologies if this is a duplicate.

Bug report info

➜  optimizers git:(main) act --bug-report
act version:            0.2.76
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
Config files:           
	/home/ng-youn/.config/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.24.1
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:         
	Build settings:
		-buildmode:           pie
		-compiler:            gc
		-trimpath:            true
		CGO_ENABLED:          1
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
Docker Engine:
	Engine version:        28.0.4
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Arch Linux
	OS type:               linux
	OS version:            
	OS arch:               x86_64
	OS kernel:             6.13.8-arch1-1
	OS CPU:                16
	OS memory:             27834 MB
	Security options:
		name=seccomp,profile=builtin
		name=cgroupns

Command used with act

act -j mypy -w .github/workflows/type-check.yml

Describe issue

I want to type check using curl, uv, make, and mypy. But it failed because uv couldn't find PATH. While uv is installed using curl, it is not the same as PATH in the local desktop.

So I fixed PATH using export PATH="$HOME/.local/bin:$PATH" like the following image, but this update is rejected because PATH could be customized, and it makes CI messy.

Image

Is there any solution for this without fixing PATH? I already tried curl -LsSf https://astral.sh/uv/install.sh | sudo env UV_INSTALL_DIR="/usr/local/bin" sh, but it didn't work.

https://github.com/facebookresearch/optimizers/pull/98

Workflow content

name: type-check

on: [push, pull_request]

jobs:
  mypy:
    runs-on: ubuntu-latest
    steps:
        - uses: actions/checkout@v4
        - name: Set up and update uv.
          run: |
            curl -LsSf https://astral.sh/uv/install.sh | sh
            uv self update
        - name: Install Python.
          run: uv python install 3.10
        - name: Create venv and install the package.
          run: |
            uv venv && source .venv/bin/activate
            uv pip install -e ".[dev]"
        - name: Run type checking with mypy.
          run: |
            source .venv/bin/activate
            make type-check

Relevant log output

➜  optimizers git:(main) act -j mypy -w .github/workflows/type-check.yml
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock' 
[type-check/mypy] ⭐ Run Set up job
[type-check/mypy] 🚀  Start image=catthehacker/ubuntu:act-latest
[type-check/mypy]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[type-check/mypy]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[type-check/mypy]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[type-check/mypy]   🐳  docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir=
[type-check/mypy]   ✅  Success - Set up job
[type-check/mypy] ⭐ Run Main actions/checkout@v4
[type-check/mypy]   🐳  docker cp src=/home/ng-youn/Documents/git/optimizers/. dst=/home/ng-youn/Documents/git/optimizers
[type-check/mypy]   ✅  Success - Main actions/checkout@v4 [46.353916ms]
[type-check/mypy] ⭐ Run Main Set up and update uv.
[type-check/mypy]   🐳  docker exec cmd=[bash -e /var/run/act/workflow/1] user= workdir=
| downloading uv 0.6.13 x86_64-unknown-linux-gnu
| no checksums to verify
| installing to /root/.local/bin
|   uv
|   uvx
| everything's installed!
| 
| To add $HOME/.local/bin to your PATH, either restart your shell or run:
| 
|     source $HOME/.local/bin/env (sh, bash, zsh)
|     source $HOME/.local/bin/env.fish (fish)
| /var/run/act/workflow/1: line 3: uv: command not found
[type-check/mypy]   ❌  Failure - Main Set up and update uv. [4.526166013s]
[type-check/mypy]   ⚙  ::add-path:: /root/.local/bin
[type-check/mypy] exitcode '127': command not found, please refer to https://github.com/nektos/act/issues/107 for more information
[type-check/mypy] ⭐ Run Complete job
[type-check/mypy]   ✅  Success - Complete job
[type-check/mypy] 🏁  Job failed
Error: Job 'mypy' failed

Additional information

No response

Originally created by @namgyu-youn on GitHub (Apr 9, 2025). Original GitHub issue: https://github.com/nektos/act/issues/2725 I did a quick search on existing issues but didn't find one that matched what I want. Apologies if this is a duplicate. ### Bug report info ```plain text ➜ optimizers git:(main) act --bug-report act version: 0.2.76 GOOS: linux GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /home/ng-youn/.config/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.24.1 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: pie -compiler: gc -trimpath: true CGO_ENABLED: 1 GOARCH: amd64 GOOS: linux GOAMD64: v1 Docker Engine: Engine version: 28.0.4 Engine runtime: runc Cgroup version: 2 Cgroup driver: systemd Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Arch Linux OS type: linux OS version: OS arch: x86_64 OS kernel: 6.13.8-arch1-1 OS CPU: 16 OS memory: 27834 MB Security options: name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh act -j mypy -w .github/workflows/type-check.yml ``` ### Describe issue I want to type check using curl, uv, make, and mypy. But it failed because `uv` couldn't find `PATH`. While `uv` is installed using `curl`, it is not the same as PATH in the local desktop. So I fixed PATH using `export PATH="$HOME/.local/bin:$PATH"` like the following image, but this update is rejected because PATH could be customized, and it makes CI messy. ![Image](https://github.com/user-attachments/assets/b26c928c-67c1-40ea-bdee-3f63469bf491) Is there any solution for this without fixing PATH? I already tried `curl -LsSf https://astral.sh/uv/install.sh | sudo env UV_INSTALL_DIR="/usr/local/bin" sh`, but it didn't work. ### Link to GitHub repository https://github.com/facebookresearch/optimizers/pull/98 ### Workflow content ```yml name: type-check on: [push, pull_request] jobs: mypy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up and update uv. run: | curl -LsSf https://astral.sh/uv/install.sh | sh uv self update - name: Install Python. run: uv python install 3.10 - name: Create venv and install the package. run: | uv venv && source .venv/bin/activate uv pip install -e ".[dev]" - name: Run type checking with mypy. run: | source .venv/bin/activate make type-check ``` ### Relevant log output ```sh ➜ optimizers git:(main) act -j mypy -w .github/workflows/type-check.yml INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock' [type-check/mypy] ⭐ Run Set up job [type-check/mypy] 🚀 Start image=catthehacker/ubuntu:act-latest [type-check/mypy] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true [type-check/mypy] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host" [type-check/mypy] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host" [type-check/mypy] 🐳 docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir= [type-check/mypy] ✅ Success - Set up job [type-check/mypy] ⭐ Run Main actions/checkout@v4 [type-check/mypy] 🐳 docker cp src=/home/ng-youn/Documents/git/optimizers/. dst=/home/ng-youn/Documents/git/optimizers [type-check/mypy] ✅ Success - Main actions/checkout@v4 [46.353916ms] [type-check/mypy] ⭐ Run Main Set up and update uv. [type-check/mypy] 🐳 docker exec cmd=[bash -e /var/run/act/workflow/1] user= workdir= | downloading uv 0.6.13 x86_64-unknown-linux-gnu | no checksums to verify | installing to /root/.local/bin | uv | uvx | everything's installed! | | To add $HOME/.local/bin to your PATH, either restart your shell or run: | | source $HOME/.local/bin/env (sh, bash, zsh) | source $HOME/.local/bin/env.fish (fish) | /var/run/act/workflow/1: line 3: uv: command not found [type-check/mypy] ❌ Failure - Main Set up and update uv. [4.526166013s] [type-check/mypy] ⚙ ::add-path:: /root/.local/bin [type-check/mypy] exitcode '127': command not found, please refer to https://github.com/nektos/act/issues/107 for more information [type-check/mypy] ⭐ Run Complete job [type-check/mypy] ✅ Success - Complete job [type-check/mypy] 🏁 Job failed Error: Job 'mypy' failed ``` ### Additional information _No response_
kerem 2026-03-01 21:49:50 +03:00
  • closed this issue
  • added the
    kind/bug
    label
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#1232
No description provided.