rax-maas / dreadnot

deploy without dread
Apache License 2.0
631 stars 61 forks source link

fix command status reporting #145

Closed zzantozz closed 1 year ago

zzantozz commented 1 year ago

A while back in history, somebody butchered this function while adding the timeout feature. It always reports that the command failed in the logs, and it spews a bunch of redundant data into the dreadnot console. This fixes it to output correct and consistent information in both the logs and the console. The stdout and stderr of the process is already shown in the console. There's no need to include it in an error here.

The git.hasChanges util function was hooked into the error message format to detect whether there were changes or not. It seems a strange way to check for changes. This also fixes that function to simply look for output from the command.