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

Error message "fatal: not a git repository" when using the GIT snapshot #7744

Closed
6 tasks done
M-Reimer opened this issue Dec 6, 2020 · 3 comments
Closed
6 tasks done

Comments

@M-Reimer
Copy link
Contributor

M-Reimer commented Dec 6, 2020

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: other AI-Thinker ESP8266MOD
  • Core Version: 47e7b2d
  • Development Env: Arduino IDE
  • Operating System: Arch Linux

Settings in IDE

  • Module: Wemos D1 mini r2
  • Flash Mode: ?
  • Flash Size: 4MB/1MB
  • lwip Variant: v2 Lower Memory
  • Reset Method: ?
  • Flash Frequency: 40Mhz
  • CPU Frequency: 80Mhz
  • Upload Using: SERIAL
  • Upload Speed: 921600

Problem Description

If I create a toolchain based on the GIT snapshot (ZIP file), then I always get the following message prior compiling:

fatal: not a git repository (or any of the parent directories): .git

Reason is that this script tries to fetch some info using GIT:

https://github.com/esp8266/Arduino/blob/master/tools/makecorever.py

The message does not cause any problems. It just looks ugly.

How do you plan to fix this? Hide the message? I could create a pull request if I know how you want this to be fixed.

@d-a-v
Copy link
Collaborator

d-a-v commented Dec 6, 2020

Can you try with:

diff --git a/tools/makecorever.py b/tools/makecorever.py
index e7bd3486..659591b5 100755
--- a/tools/makecorever.py
+++ b/tools/makecorever.py
@@ -26,7 +26,7 @@ def generate(path, platform_path, git_ver="ffffffff", git_desc="unspecified"):
     def git(*args):
         cmd = ["git", "-C", platform_path]
         cmd.extend(args)
-        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True)
+        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True, stderr=DEVNULL)
         return proc.stdout.readlines()[0].strip()
 
     try:

If that suits your need, would you make a pull request ?

@M-Reimer
Copy link
Contributor Author

M-Reimer commented Dec 6, 2020

Done: #7745

@d-a-v d-a-v closed this as completed in 4566400 Dec 10, 2020
@d-a-v
Copy link
Collaborator

d-a-v commented Dec 10, 2020

closed by #7745

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

2 participants