79512969

Date: 2025-03-16 17:45:23
Score: 0.5
Natty:
Report link

The issue was resolved by changing how the script was executed. Previously, it was run directly through Steam. Now, the script is written to a temporary file, made executable, and then executed with sudo bash. This change, using the following code, fixed the problem:

const command = `
      cat > /tmp/temp_script.sh << 'EOFSCRIPT'
${escapedScript}
EOFSCRIPT
      chmod +x /tmp/temp_script.sh
      sudo bash /tmp/temp_script.sh
      rm /tmp/temp_script.sh
    `;

solved the problem.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ben Jonson