Skip to content

Commit

Permalink
Fix building from distribution archive
Browse files Browse the repository at this point in the history
Closes #751
  • Loading branch information
afh authored and hhrutter committed Jan 27, 2024
1 parent 043541b commit 12e046d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/pdfcpu/process.go
Expand Up @@ -132,6 +132,9 @@ func printVersion(conf *model.Configuration) {
for _, setting := range info.Settings {
if setting.Key == "vcs.revision" {
commit = setting.Value
if len(commit) >= 8 {
commit = commit[:8]
}
}
if setting.Key == "vcs.time" {
date = setting.Value
Expand All @@ -140,7 +143,7 @@ func printVersion(conf *model.Configuration) {
}
}

fmt.Fprintf(os.Stdout, "commit: %s (%s)\n", commit[:8], date)
fmt.Fprintf(os.Stdout, "commit: %s (%s)\n", commit, date)
fmt.Fprintf(os.Stdout, "base : %s\n", runtime.Version())
fmt.Fprintf(os.Stdout, "config: %s\n", conf.Path)
}
Expand Down

0 comments on commit 12e046d

Please sign in to comment.