// runCommand and wait until finish
// returns logsFilePath
runCommand and wait until finish
returns logsFilePath
// runCommand and wait until finish // returns logsFilePath
func runCommand(command string, args []string, logFileName string) string {
	var err error
	workDir := "./"
	logsFilePath := getLogsDir() + logFileName + ".log"
	stdoutFile, err := os.Create(logsFilePath)
	if err != nil {
		panic(err)
	}
	defer stdoutFile.Close()
	stderrFile, err := os.Create(logsFilePath)
	if err != nil {
		panic(err)
	}
	defer stderrFile.Close()
	var envs = os.Environ()
	cmd := exec.Command(command, args...)
	cmd.Stdout = stdoutFile
	cmd.Stderr = stderrFile
	cmd.Dir = workDir
	cmd.Env = envs
	cmd.Wait()
	err = cmd.Start()
	if err != nil {
		log.Fatal(err)
	}
	cmd.Wait()
	return logsFilePath
}
func runCommand ( command string , args [ ] string , logFileName string ) string { var err error workDir := " " logsFilePath := getLogsDir ( ) + logFileName + " " stdoutFile , err := os . Create ( logsFilePath ) if err != nil { panic ( err ) } defer stdoutFile . Close ( ) stderrFile , err := os . Create ( logsFilePath ) if err != nil { panic ( err ) } defer stderrFile . Close ( ) var envs = os . Environ ( ) cmd := exec . Command ( command , args ... ) cmd . Stdout = stdoutFile cmd . Stderr = stderrFile cmd . Dir = workDir cmd . Env = envs cmd . Wait ( ) err = cmd . Start ( ) if err != nil { log . Fatal ( err ) } cmd . Wait ( ) return logsFilePath }
runCommand and wait until finish
returns logsFilePath
runCommand and wait until finish returns logsFilePath
// Set log files // Convert env data // log.Printf("Just ran subprocess %d.\n", a.Cyan(cmd.Process.Pid))