Commit f3602fef authored by 金凯强's avatar 金凯强 🎨

修复Python读取文件报错

parent 7b14e1fb
......@@ -41,7 +41,7 @@ class InstallService(HSBaseUCService):
def _edit_runner_setting(self):
os.system("sudo chmod 777 /etc/gitlab-runner/config.toml")
with open('/etc/gitlab-runner/config.toml', 'rw') as f:
with open('/etc/gitlab-runner/config.toml', 'w') as f:
s = f.read()
a = s.replace('volumes = ["/cache"]',
'volumes = ["/var/run/docker.sock:/var/run/docker.sock","/etc/profile.d/huansi.sh:/etc/profile.d/huansi.sh" ,"/cache","/huansi/gitlab-runner/builds:/builds/hs"]')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment