Nah, I'll leave then sudo thing

This commit is contained in:
jeffser 2024-10-09 12:51:02 -06:00
parent 9f4b6faf28
commit d55aaf19a2

View File

@ -440,6 +440,8 @@ def run_script_response(self, dialog, task, script, language_name):
script = ';\n'.join(script)
script += '; echo "\n🦙 {}"'.format(_('Script exited'))
if language_name == 'bash':
script = re.sub(r'(?m)^\s*sudo', 'pkexec', script)
if shutil.which('flatpak-spawn') and language_name == 'bash':
sandbox = True
try: