Remove sudo from timedatectl and localectl subprocess calls

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/925a72d0-2cdd-4940-b338-07772f3f8a68

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-09 11:00:18 +00:00
committed by GitHub
parent 701c400916
commit 8ea133a2a1

View File

@@ -3293,7 +3293,7 @@ async def api_system_set_timezone(req: TimezoneRequest):
result = await loop.run_in_executor( result = await loop.run_in_executor(
None, None,
lambda: subprocess.run( lambda: subprocess.run(
["sudo", "timedatectl", "set-timezone", tz], ["timedatectl", "set-timezone", tz],
capture_output=True, capture_output=True,
text=True, text=True,
timeout=15, timeout=15,
@@ -3336,7 +3336,7 @@ async def api_system_set_locale(req: LocaleRequest):
result = await loop.run_in_executor( result = await loop.run_in_executor(
None, None,
lambda: subprocess.run( lambda: subprocess.run(
["sudo", "localectl", "set-locale", f"LANG={locale}"], ["localectl", "set-locale", f"LANG={locale}"],
capture_output=True, capture_output=True,
text=True, text=True,
timeout=15, timeout=15,