[GH-ISSUE #262] $PATH gets reset when invoking uses: paambaati/codeclimate-action@v2.3.0 #183

Closed
opened 2026-03-01 21:40:58 +03:00 by kerem · 2 comments
Owner

Originally created by @jbooth-mastery on GitHub (May 29, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/262

Hi folks! It looks like the $PATH variable is getting reset when using the codeclimate action. This doesn't happen on github itself, so I'm guessing it is an act bug?

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/setup-node@v1
      with:
        node-version: '14.x'
    - name: printenv                                                                
      run: printenv                                                                 
    - name: Act workaround for issue                                                
      id: yarn                                                                      
      run: echo "::set-output name=path::$PATH"                                     
    - name: printenv                                                                
      run: printenv                                                                 
    - name: Test & publish code coverage                                            
      uses: paambaati/codeclimate-action@v2.3.0                                     
      env:                                                                          
        CC_TEST_REPORTER_ID: fake                                                   
        SAVED_PATH: ${{ steps.yarn.outputs.path }}                                  
      with:                                                                         
        coverageCommand: printenv

When run, you'll see in the first printenv (before code climate):

[CI/build] ⭐  Run printenv
PATH=/opt/hostedtoolcache/node/14.3.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

But then on the printenv inside codeclimate-action:

[CI/build]   💬  ::debug::✅ CC Reporter before-build checkin completed...
| [command]printenv
| PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
| SAVED_PATH=/opt/hostedtoolcache/node/14.3.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

The same behavior also happens with a setup-python against version 3.x -- the path gets mutated and your setup is lost.

Originally created by @jbooth-mastery on GitHub (May 29, 2020). Original GitHub issue: https://github.com/nektos/act/issues/262 Hi folks! It looks like the $PATH variable is getting reset when using the codeclimate action. This doesn't happen on github itself, so I'm guessing it is an act bug? ```yaml name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/setup-node@v1 with: node-version: '14.x' - name: printenv run: printenv - name: Act workaround for issue id: yarn run: echo "::set-output name=path::$PATH" - name: printenv run: printenv - name: Test & publish code coverage uses: paambaati/codeclimate-action@v2.3.0 env: CC_TEST_REPORTER_ID: fake SAVED_PATH: ${{ steps.yarn.outputs.path }} with: coverageCommand: printenv ``` When run, you'll see in the first printenv (before code climate): ``` [CI/build] ⭐ Run printenv PATH=/opt/hostedtoolcache/node/14.3.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ``` But then on the printenv inside codeclimate-action: ``` [CI/build] 💬 ::debug::✅ CC Reporter before-build checkin completed... | [command]printenv | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | SAVED_PATH=/opt/hostedtoolcache/node/14.3.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ``` The same behavior also happens with a setup-python against version 3.x -- the path gets mutated and your setup is lost.
kerem 2026-03-01 21:40:58 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 1, 2020):

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

<!-- gh-comment-id:667435473 --> @github-actions[bot] commented on GitHub (Aug 1, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@github-actions[bot] commented on GitHub (Oct 5, 2020):

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

<!-- gh-comment-id:703338823 --> @github-actions[bot] commented on GitHub (Oct 5, 2020): Issue is stale and will be closed in 7 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#183
No description provided.