Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Must dispose UpdateManager.GithubManager.Result #1396

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
5 changes: 4 additions & 1 deletion docs/using/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ using Squirrel;

~~~cs
using (var mgr = UpdateManager.GitHubUpdateManager("https://github.com/myuser/myapp"))
using (var result = await mgr)
{
await mgr.Result.UpdateApp();
await result.UpdateApp();
}
~~~

**Important:** Make sure your url doesn't end in a forward slash ("/"). Adding the trailing forward slash will cause it to fail with a 404 error ([see #641](https://github.com/Squirrel/Squirrel.Windows/issues/641#issuecomment-201478324)).

**Important:** Make sure to dispose `result`. Not disposing `mgr.Result` will leak mutex (see [#587](https://github.com/Squirrel/Squirrel.Windows/issues/587#issuecomment-332396577)).

**Tip:** You can also specify that the update manager should use `prerelease` for updating (see method signature for details).

**Source:** See [Issue #442](https://github.com/Squirrel/Squirrel.Windows/issues/442) for more information.
Expand Down