diff options
author | crupest <crupest@outlook.com> | 2022-11-27 14:16:24 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-27 14:16:24 +0800 |
commit | 5d3f980938b0a9f1faf5be48e9d45928326d0cfa (patch) | |
tree | f1396da193d676ed9e9e19abdc744a97f99b60dc | |
parent | 2ee2109525f8a098f5512d8233b0d3c5ba1fbb7d (diff) | |
download | crupest-5d3f980938b0a9f1faf5be48e9d45928326d0cfa.tar.gz crupest-5d3f980938b0a9f1faf5be48e9d45928326d0cfa.tar.bz2 crupest-5d3f980938b0a9f1faf5be48e9d45928326d0cfa.zip |
Fix aio subprocess.run issue.
-rwxr-xr-x | tool/aio.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/aio.py b/tool/aio.py index 639b7dc..50b42fa 100755 --- a/tool/aio.py +++ b/tool/aio.py @@ -557,7 +557,7 @@ def check_ssl_cert(): ensure_tmp_dir() subprocess.run( ["sudo", "cp", cert_path, tmp_cert_path], check=True) - subprocess.run(["sudo", "chown", os.geteuid(), + subprocess.run(["sudo", "chown", str(os.geteuid()), tmp_cert_path], check=True) cert_domains = get_cert_domains(tmp_cert_path, domain) if cert_domains is None: @@ -595,8 +595,8 @@ if os.path.isdir(data_dir): to_fix = Confirm.ask( "Do you want me to help you fix it?", console=console, default=True) if to_fix: - os.system( - f"sudo chown -R {os.getuid()}:{os.getgid()} {os.path.join(data_dir, 'code-server')}") + subprocess.run( + ["sudo", "chown", "-R", f"{os.getuid()}:{os.getgid()}", os.path.join(data_dir, 'code-server')], check=True) console.print(":beers: All done!", style="green") to_download_tools = Confirm.ask( |