diff --git a/pkg/runtime/command.go b/pkg/runtime/command.go index 4c26d9d..478be4b 100644 --- a/pkg/runtime/command.go +++ b/pkg/runtime/command.go @@ -25,7 +25,7 @@ func newCommand(taskConfig config.TaskConfig) command { sudoCmd = "sudo -S " } cmd := exec.Command(shell, "-c", sudoCmd+taskConfig.CmdString+"; BASHFUL_RC=$?; env >&3; exit $BASHFUL_RC") - cmd.Stdin = strings.NewReader(string(sudoPassword) + "\n") + cmd.Stdin = strings.NewReader(sudoPassword + "\n") // Set current working directory; default is empty cmd.Dir = taskConfig.CwdString diff --git a/pkg/runtime/handler/compressed_ui.go b/pkg/runtime/handler/compressed_ui.go index 9e15091..d4d9523 100644 --- a/pkg/runtime/handler/compressed_ui.go +++ b/pkg/runtime/handler/compressed_ui.go @@ -109,7 +109,7 @@ func (handler *CompressedUI) displayTask(task *runtime.Task) { emptyColor = color.ColorCode(strconv.Itoa(handler.config.Options.ColorError)) } - numFill := int(effectiveWidth) * len(handler.runtimeData.Completed) / handler.runtimeData.Total + numFill := effectiveWidth * len(handler.runtimeData.Completed) / handler.runtimeData.Total if handler.config.Options.ShowSummaryTimes { duration := time.Since(handler.startTime)