Skip to content

Commit 827ae16

Browse files
Use actual binary name in update notification
- Derive binary name from os.Args[0] instead of hardcoding 'deepsource' - Replace em dash with comma in the message
1 parent a0b7e0f commit 827ae16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/deepsource/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"log"
77
"net/http"
88
"os"
9+
"path/filepath"
910
"strings"
1011
"time"
1112

@@ -85,7 +86,7 @@ func run() int {
8586
debug.Log("update: %v", err)
8687
}
8788
if state != nil {
88-
fmt.Fprintln(os.Stderr, pterm.Yellow(fmt.Sprintf("Update available: v%srun 'deepsource update' to install.", state.Version)))
89+
fmt.Fprintln(os.Stderr, pterm.Yellow(fmt.Sprintf("Update available: v%s, run '%s update' to install.", state.Version, filepath.Base(os.Args[0]))))
8990
}
9091
}
9192

0 commit comments

Comments
 (0)