Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/officecli/Core/UpdateChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ internal static class UpdateChecker
/// </summary>
internal static void CheckInBackground()
{
if (Environment.GetEnvironmentVariable("OFFICECLI_SKIP_UPDATE") == "1")
return;

// Best-effort: SaveConfig falls back to $TMPDIR inside containers when
// home is read-only, so a CreateDirectory failure here is not fatal.
try { Directory.CreateDirectory(ConfigDir); } catch { /* continue */ }
Expand Down Expand Up @@ -102,6 +105,9 @@ internal static void CheckInBackground()
/// </summary>
internal static void RunRefresh()
{
if (Environment.GetEnvironmentVariable("OFFICECLI_SKIP_UPDATE") == "1")
return;

try
{
var config = LoadConfig();
Expand Down