Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

remove cli update notification delay

Maidul Islambb3d591f215f
diff --git a/cli/packages/util/check-for-update.go b/cli/packages/util/check-for-update.go
index 9921cef0d8..ad07cb1d48 100644
--- a/cli/packages/util/check-for-update.go
+++ b/cli/packages/util/check-for-update.go
@@ -28,9 +28,9 @@ func CheckForUpdate() {
return
}
- daysSinceRelease, _ := daysSinceDate(publishedDate)
+ // daysSinceRelease, _ := daysSinceDate(publishedDate)
- if latestVersion != CLI_VERSION && daysSinceRelease > 2 {
+ if latestVersion != CLI_VERSION {
yellow := color.New(color.FgYellow).SprintFunc()
blue := color.New(color.FgCyan).SprintFunc()
black := color.New(color.FgBlack).SprintFunc()
@@ -151,15 +151,15 @@ func IsRunningInDocker() bool {
return strings.Contains(string(cgroup), "docker")
}
-func daysSinceDate(dateString string) (int, error) {
- layout := "2006-01-02T15:04:05Z"
- parsedDate, err := time.Parse(layout, dateString)
- if err != nil {
- return 0, err
- }
-
- currentTime := time.Now()
- difference := currentTime.Sub(parsedDate)
- days := int(difference.Hours() / 24)
- return days, nil
-}
+// func daysSinceDate(dateString string) (int, error) {
+// layout := "2006-01-02T15:04:05Z"
+// parsedDate, err := time.Parse(layout, dateString)
+// if err != nil {
+// return 0, err
+// }
+
+// currentTime := time.Now()
+// difference := currentTime.Sub(parsedDate)
+// days := int(difference.Hours() / 24)
+// return days, nil
+// }