ExchangeUnion / xud-docker

Streamlined setup of xud and all dependencies via docker 🐳
https://docs.exchangeunion.com
GNU Affero General Public License v3.0
5 stars 5 forks source link

The tools scripts cannot find "git" when using Snap installed python38 #713

Open reliveyy opened 4 years ago

reliveyy commented 4 years ago

tools/build xud results in

/bin/sh: 1: git: not found
/bin/sh: 1: git: not found
sh: 1: git: not found
Traceback (most recent call last):
  File "/home/native/xud-docker/tools/core/git.py", line 28, in get_master_commit_hash
    return execute("git rev-parse master").splitlines()[0]
  File "/home/native/xud-docker/tools/core/utils.py", line 5, in execute
    output = check_output(cmd, shell=True, stderr=STDOUT)
  File "/snap/python38/22/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/snap/python38/22/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git rev-parse master' returned non-zero exit status 127.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/helper.py", line 51, in <module>
    main()
  File "tools/helper.py", line 35, in main
    toolkit = Toolkit(project_dir, ["linux/amd64", "linux/arm64"])
  File "/home/native/xud-docker/tools/core/toolkit.py", line 98, in __init__
    self.git_template = GitTemplate(self.project_dir)
  File "/home/native/xud-docker/tools/core/git.py", line 49, in __init__
    self.git_info = self._create_git_info()
  File "/home/native/xud-docker/tools/core/git.py", line 73, in _create_git_info
    master = get_master_commit_hash()
  File "/home/native/xud-docker/tools/core/git.py", line 31, in get_master_commit_hash
    return execute("git ls-remote origin master").split()[0]
  File "/home/native/xud-docker/tools/core/utils.py", line 5, in execute
    output = check_output(cmd, shell=True, stderr=STDOUT)
  File "/snap/python38/22/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/snap/python38/22/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git ls-remote origin master' returned non-zero exit status 127.
native@ubuntu:~/xud-docker$ git rev-parse master
4727c56b5ec23aea168f8c48fce7f5703b76b89e
native@ubuntu:~/xud-docker$ git ls-remote origin master
4727c56b5ec23aea168f8c48fce7f5703b76b89e    refs/heads/master