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

pmd command not found. #1

Closed
eefi0077 opened this issue Dec 3, 2019 · 4 comments
Closed

pmd command not found. #1

eefi0077 opened this issue Dec 3, 2019 · 4 comments

Comments

@eefi0077
Copy link

eefi0077 commented Dec 3, 2019

Hey trying to use this Github Action but I am running to one issue. I am using sfdx-actions/pmd@v9, but when I was using sfdx-actions/pmd@v1 it was giving me output under the
uses: sfdx-actions@v1 when I switched to v9 I am getting pmd command not found. When I use v1 it errors out on the uses section.

actions file


    steps:
      - uses: sfdx-actions/pmd@v9
      - name: run-pmd
        run: pmd -d ./force-app/main/default/classes -R category/apex/design.xml -f text

Output

Set up job 2s
Run actions/checkout@v1 1s
Run sfdx-actions/pmd@v9 2s
Run sfdx-actions/pmd@v9
Run sfdx-actions/pmd@v9
run-pmd0s
##[error]Process completed with exit code 127.
Run pmd -d ./force-app/main/default/classes -R category/apex/design.xml -f text
/home/runner/work/_temp/483de406-35ea-4920-831d-0b2aefec05e7.sh: line 1: pmd: command not found
##[error]Process completed with exit code 127.
Complete job

@mahavrilla
Copy link

I think this issue is that since it's JS the executePMD() is running before installPMD() is finished. These should be a promise, or just call executePMD() within installPMD()

https://github.com/sfdx-actions/pmd/blob/master/index.js#L4-L9

@fechanique
Copy link
Contributor

The problem is that I'm trying to create an alias so you can use "pmd" to execute actions, but I can't for the moment solve it, so maybe for the moment the best solution is calling the executable direclty

@mahavrilla
Copy link

Oh that makes sense. I'm not 100% confident in that process, but I'd wonder if it's possible to release a version without using aliases as you said. I'd be willing to help get it working with alias.

I see a great opportunity for this action (thank you for creating it) so wondering the level of effort to release a version calling it directly?

@fechanique
Copy link
Contributor

Ok, for the moment is going to work with something like: $HOME/pmd/bin/run.sh pmd

If you have any suggestion creating an alias, are welcome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants