Skip to content

Allow disabling automatic self-update with env#31

Merged
kevinmcconnell merged 1 commit intomainfrom
auto-update-disable
Mar 31, 2026
Merged

Allow disabling automatic self-update with env#31
kevinmcconnell merged 1 commit intomainfrom
auto-update-disable

Conversation

@kevinmcconnell
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2026 12:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an opt-out switch for ONCE’s background runner so operators can disable the automatic self-update behavior via an environment variable.

Changes:

  • Skip self-update checks when ONCE_NO_SELF_UPDATE is set.
  • Add os import to support environment-variable lookup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +83
if os.Getenv("ONCE_NO_SELF_UPDATE") != "" {
return false
}
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New behavior to disable self-update via ONCE_NO_SELF_UPDATE isn’t covered by tests. Since this branch returns before using ns/state, a small unit test can set the env var and assert checkSelfUpdate returns false (and does not require constructing a real namespace/state).

Copilot uses AI. Check for mistakes.
@kevinmcconnell kevinmcconnell merged commit fe6a0b2 into main Mar 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants