Fix CI error: fatal: transport 'file' not allowed (#6557)
This commit is contained in:
@@ -6,10 +6,12 @@ import tempfile
|
||||
import os
|
||||
|
||||
|
||||
def set_git_identity():
|
||||
def set_git_config():
|
||||
"""Set local git identity, but only in local repo (to not overwrite user settings)"""
|
||||
"""Also, fix git issue: fatal: transport 'file' not allowed"""
|
||||
subprocess.run(['git', 'config', 'user.name', 'James Bond'])
|
||||
subprocess.run(['git', 'config', 'user.email', '007@sis.gov.uk'])
|
||||
subprocess.run(['git', 'config', '--global', 'protocol.file.allow', 'always'])
|
||||
|
||||
|
||||
def create_file(filename: str, file_content: str):
|
||||
@@ -31,7 +33,7 @@ class ScriptTest():
|
||||
# prerequirements
|
||||
Path('data/themes').mkdir(parents=True)
|
||||
subprocess.run(['git', 'init', '-b', 'main'], check=True)
|
||||
set_git_identity()
|
||||
set_git_config()
|
||||
subprocess.run(['git', 'submodule', 'add', '../../carla', 'plugins/CarlaBase/carla'], check=True)
|
||||
create_file('src/core/classes.cpp', 'namespace lmms {\nclass TestClass\n}')
|
||||
create_file('debian/lmms-common.docs', '')
|
||||
@@ -87,7 +89,7 @@ with tempfile.TemporaryDirectory() as tmpdir:
|
||||
Path('carla').mkdir()
|
||||
os.chdir('carla')
|
||||
subprocess.run(['git', 'init', '-b', 'main'], check=True)
|
||||
set_git_identity()
|
||||
set_git_config()
|
||||
create_file('README.md', 'hello world')
|
||||
subprocess.run(['git', 'commit', '-m', 'Initial commit'], check=True)
|
||||
os.chdir('..')
|
||||
|
||||
Reference in New Issue
Block a user