package aapt

import (
	"os/exec"

	"notabug.org/Umnik/GoAndroidSDK/v2/components/misc"
)

// RunSync executes Aapt commands
func (aapt Aapt) RunSync(command string, args ...string) ([]byte, error) {
	cmd := append([]string{command}, args...)
	return misc.TrimOut(exec.Command(aapt.BinPath(), cmd...).CombinedOutput())
}
