Skip to content

Commit 7ef01df

Browse files
committed
Update WindowStrategy.cs
1 parent a64f25c commit 7ef01df

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/c#/GeneralUpdate.Bowl/Strategys/WindowStrategy.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,19 @@ private void Restore()
8686
GeneralFileManager.Restore(_parameter.BackupDirectory, _parameter.TargetPath);
8787
}
8888

89-
89+
/// <summary>
90+
/// Write the failed update version number to the local environment variable.
91+
/// </summary>
9092
private void SetEnvironment()
9193
{
9294
if (!string.Equals(_parameter.WorkModel, WorkModel))
9395
return;
94-
96+
97+
/*
98+
* The `UpgradeFail` environment variable is used to mark an exception version number during updates.
99+
* If the latest version number obtained via an HTTP request is less than or equal to the exception version number, the update is skipped.
100+
* Once this version number is set, it will not be removed, and updates will not proceed until a version greater than the exception version number is obtained through the HTTP request.
101+
*/
95102
Environment.SetEnvironmentVariable("UpgradeFail", _parameter.ExtendedField, EnvironmentVariableTarget.User);
96103
}
97104
}

0 commit comments

Comments
 (0)