Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid unnecessary conversions #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/runtime/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/runtime/handler/compressed_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down