Skip to content

Commit 28d2ac4

Browse files
committed
add comment
1 parent b41a3af commit 28d2ac4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/orchestrator/config/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ func NewFromEnv() (Configuration, error) {
108108
}
109109
maxVersionStr := os.Getenv("ARDUINO_APP_CLI__MAX_UPDATE_MAJOR_VERSION")
110110

111+
// If the value is 0 (or unset), the updater logic defaults to the currently installed major version.
112+
//This ensures we don't accidentally upgrade to a new major version (breaking changes) unless explicitly allowed.
113+
111114
maxVersion, err := strconv.Atoi(maxVersionStr)
112115
if err != nil || maxVersion <= 0 {
113116
maxVersion = 0

0 commit comments

Comments
 (0)