Merge pull request #1207 from thaJeztah/output_add_padding

frontend: add padding to align steps in stage
v0.7
Tõnis Tiigi 2019-10-21 14:13:24 -07:00 committed by GitHub
commit 02adc6b7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
"math"
"net/url"
"path"
"path/filepath"
@ -1325,7 +1326,7 @@ func prefixCommand(ds *dispatchState, str string, prefixPlatform bool, platform
out += ds.stageName + " "
}
ds.cmdIndex++
out += fmt.Sprintf("%d/%d] ", ds.cmdIndex, ds.cmdTotal)
out += fmt.Sprintf("%*d/%d] ", int(1+math.Log10(float64(ds.cmdTotal))), ds.cmdIndex, ds.cmdTotal)
return out + str
}