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
BUG (Docker): Not a git repository in Docker when running pre-commit hook in docker #20265
Comments
@Shriyam-Avasthi It's strange .git isn't copied in Docker container, could you please rebuild it by following.
Also, can you tell in which system this occurred. Also just to check,
|
Already done that, still the bug persists.
I am using WSL2.
|
@Shriyam-Avasthi I have confirmed bug occurs in WSL, thanks for bringing it. Being busy, I need some time to find proper fix to it. But till then I found temporary solution which you can use, so this issue doesn't stop you from contributing. Please do following:
Please, reply if solution works or even if you need any further help. |
@jayam04
Additionally, just to be sure, I went ahead and created another branch and modified only the following piece of code, in essence, just adding a isDiagramCreated(): boolean {
// This function checks if any shape has been created or not.
return Boolean(
!this.isUserDrawing() &&
this.diagramStatus === this.STATUS_EDITING &&
this.canvas &&
this.canvas.getObjects().length > 0
);
} to isDiagramCreated(): boolean {
// This function checks if any shape has been created or not.
return Boolean(
!this.isUserDrawing() &&
this.diagramStatus === this.STATUS_EDITING &&
this.canvas &&
this.canvas.getObjects().length > 0 &&
true
);
} |
I face the same issue. My OS is Arch Linux with Hyprland. I made a single CSS file change just to test, but when I try to commit it, an error pops up.
|
@Ari1009 Above issue is resolved in #19962 but not yet commited. Could you please update git username and email in Docker Container manually. You can do it by running:
|
@Ari1009 You mentioned failing pre-push due to frontend tests, could you please tell if you are still facing it or not? |
Thanks, this works |
I'm also facing another issue. I made some changes in .assets/constants.ts, but when I try to commit, this error pops up.
|
@Ari1009 I have opened a new PR to fix this issue, would you like to help verify that changes resolves the issue. |
Yes, thank you. This fixes the issue that I faced. |
Describe the bug
When committing the changes using
git commit -m "Message"
we are getting the following errors:URL of the page where the issue is observed.
N/A
Steps To Reproduce
git commit -m <message>
Expected Behavior
It should successfully run pre-commit hook inside Docker container.
Screenshots/Videos
No response
What device are you using?
Desktop
Operating System
Other
What browsers are you seeing the problem on?
No response
Browser version
No response
Additional context
This issue is faced by @Shriyam-Avasthi, as is discussed in #20167
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).
Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!
The text was updated successfully, but these errors were encountered: