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

Fix adjust_for_docker #3732

Merged
merged 1 commit into from Aug 30, 2021
Merged

Conversation

ChrisBr
Copy link
Contributor

@ChrisBr ChrisBr commented Aug 18, 2021

It appears to me that the chdir is missing one level of indentation because it basically gets executed every single time. So even locally, if the src directory exists it would chdir even though we're not in docker.

This caused us a couple of hours of debugging at Shopify.

I know there were several attempts to fix the whole docker chdir issue #3125 and #3134 but this seems unrelated and I just wanted to bring it up.

Also fine if you decide to not fix it as we can work around with setting the path in an env variable.

PR checklist:

  • documentation is up to date
  • changelog is up to date

@CLAassistant
Copy link

CLAassistant commented Aug 18, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@brendongo brendongo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find thanks!

@ievans
Copy link
Member

ievans commented Aug 18, 2021

Does this close #2123 also?

@brendongo
Copy link
Member

I don't think so. This change will only stop chdir when not in docker. #2123 looks like behavior in docker container

@ChrisBr
Copy link
Contributor Author

ChrisBr commented Aug 19, 2021

Thanks for approval. I have to double check with legal before I sign the CLA. Stay tuned.

@ChrisBr
Copy link
Contributor Author

ChrisBr commented Aug 24, 2021

Signed CLA

@ievans
Copy link
Member

ievans commented Aug 24, 2021

🙏 @ChrisBr thanks for the contribution! @brendongo want to merge!

@brendongo brendongo merged commit e56dc1e into semgrep:develop Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants