kas/libcmd: Instead of copying the .gitconfig, create a new dummy one
Copying the .gitconfig failes if the current user doesn't have one, since the commits that are done within kas, will not be pushed or merged anywhere, we can just create a minimal .gitconfig in the temp home directory of kas. Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
parent
e8851a5fb3
commit
40e528065f
@ -92,8 +92,10 @@ class SetupHome(Command):
|
||||
fds.write('\n')
|
||||
with open(self.tmpdirname + '/.netrc', 'w') as fds:
|
||||
fds.write('\n')
|
||||
shutil.copyfile(os.path.expanduser('~/.gitconfig'),
|
||||
self.tmpdirname + '/.gitconfig')
|
||||
with open(self.tmpdirname + '/.gitconfig', 'w') as fds:
|
||||
fds.write('[User]\n'
|
||||
'\temail = kas@example.com\n'
|
||||
'\tname = Kas User\n')
|
||||
config.environ['HOME'] = self.tmpdirname
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user