sandialabs / sceptre-phenix-apps

Apps written to work with the latest version of phenix
https://github.com/sandialabs/sceptre-phenix
GNU General Public License v3.0
6 stars 14 forks source link

feat(cc): write exec/background commands to file for execution #19

Closed activeshadow closed 1 year ago

activeshadow commented 1 year ago

To avoid issues with command quoting, piping, and redirects, the Scorch component now writes exec and background args specified in the config to file, sends the file to the target VM, and then uses bash or PowerShell to execute the file on the target VM. This all happens in the background without any additional configuration from the user.

This PR also includes updates to query command exit codes from minimega for exec commands for Linux targets and use the presence of STDERR to determine if PowerShell didn't exit correctly for Windows targets.