-
Notifications
You must be signed in to change notification settings - Fork 123
Conversation
@@ -12,7 +13,8 @@ private static string NuKeeperTempFilesPath() | |||
|
|||
public static void DeleteExistingTempDirs() | |||
{ | |||
var dirs = Directory.EnumerateDirectories(NuKeeperTempFilesPath()); | |||
var dirInfo = new DirectoryInfo(NuKeeperTempFilesPath()); | |||
var dirs = dirInfo.Exists ? dirInfo.EnumerateDirectories() : Enumerable.Empty<DirectoryInfo>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change cause it doesn't work on first use otherwise
I think I may not have needed to add the username command line argument, as the I point it at a repo that belongs to an org, I was expecting this to create a fork, we push to that fork, then the PR is from that fork, in which case |
README.md
Outdated
@@ -43,6 +43,7 @@ C:\Code\NuKeeper\NuKeeper>dotnet run mode=organisation github_token=<GitToken> g | |||
| Name | Alias | Default value | Required | | |||
|----------------------------------|-------|------------------------|-----------------| | |||
| mode | m | | Yes | | |||
| github_user | u | | Yes | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to also add an explanation of parameter below and add the parameter to the examples above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to fix up the README
Why do we need a github user? |
We don't, my bad. |
@AnthonySteele Updated, I was rushing though 🤞 |
public Task Clone(Uri pullEndpoint) | ||
{ | ||
Repository.Clone(pullEndpoint.ToString(), _repoStoragePath); | ||
return Task.CompletedTask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is LibGit2Sharp
likely to become async at any time soon?
Basically if not, and we discard the other git driver we should then make these methods sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not anytime soon is my understanding libgit2/libgit2sharp#1440
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall I do that in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can cleanup in a following PR.
RunAll(repositoryDiscovery, lookups, updateSelection, github) | ||
// get some storage space | ||
var tempDir = TempFiles.MakeUniqueTemporaryPath(); | ||
var githubUser = github.GetCurrentUser().GetAwaiter().GetResult(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to push these lines into a single async method so that there's only one point of resynchronisation with .GetAwaiter().GetResult()
Fixes #10