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

Syntax error in /build/Linux/build/common/setenv.sh #2863

Closed
Lilstritz opened this issue Oct 31, 2024 · 5 comments · Fixed by #2864 or #2865
Closed

Syntax error in /build/Linux/build/common/setenv.sh #2863

Lilstritz opened this issue Oct 31, 2024 · 5 comments · Fixed by #2864 or #2865
Labels
bug Something isn't working community To tag external issues and PRs

Comments

@Lilstritz
Copy link

Lilstritz commented Oct 31, 2024

There's a syntax error in the file /build/Linux/build/common/setenv.sh

Screenshot 2024-10-31 at 1 53 04 PM

Description
A recent build in my team's CI pipeline failed with the error /usr/local/newrelic-dotnet-agent/setenv.sh: line 3: syntax error near unexpected token '&&'

Expected Behavior
Build doesn't fail. Syntax is correct.

The problem:
(I believe?) The first semicolon should be removed: https://github.com/newrelic/newrelic-dotnet-agent/blob/main/build/Linux/build/common/setenv.sh#L3

Introduced in #2852

Apologies if I'm missing anything.

@Lilstritz Lilstritz added the bug Something isn't working label Oct 31, 2024
@workato-integration
Copy link

@github-actions github-actions bot added the community To tag external issues and PRs label Oct 31, 2024
@Lilstritz
Copy link
Author

I tried to push a branch with the fix but I got a 403. I've never attempted to contribute to a public repo before so I don't know the rules. In any case, I think / hope this is straightforward enough.

tippmar-nr added a commit that referenced this issue Oct 31, 2024
Fixes a syntax error that was introduced in #2852. 

Resolves #2863
@tippmar-nr
Copy link
Member

@Lilstritz Thanks for your report - the fix was easy enough. Next time, you can fork our repo, make a change in a branch on your fork and then open a PR to our repo with the change.

@Lilstritz
Copy link
Author

Thanks for the quick turnaround and thanks for the information.

@Lilstritz
Copy link
Author

Lilstritz commented Nov 1, 2024

This issue inspired me to add shellcheck to my team's codebase's CI pipelines. I attempted to apply the same change in this codebase, but I ran into some nontrivial shell errors that I have no business meddling with in this codebase.

But in case it interests anybody, applying the check for me was fairly straightforward, and I'll leave the github workflow instructions here in case anybody (with more domain knowledge or confidence) wants to take a shot at cleaning up the shell errors and integrating a shell linter into the CI pipeline.

  shellcheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4 
      - run: |
          sudo apt-get update && sudo apt-get install -y shellcheck
          find ${{ github.workspace }} -name "*.sh" -exec shellcheck --severity=error {} +

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community To tag external issues and PRs
Projects
None yet
2 participants