-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See https://github.com/GitCredentialManager/git-credential-manager/releases/tag/v2.0.785
- Loading branch information
Showing
8 changed files
with
84 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
[submodule "gcm"] | ||
path = gcm | ||
url = https://github.com/microsoft/Git-Credential-Manager-Core | ||
branch = master | ||
[submodule "external/gcm"] | ||
path = external/gcm | ||
url = https://github.com/GitCredentialManager/git-credential-manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# ignore submodule | ||
[gcm/**] | ||
generated_code = true |
Submodule gcm
deleted from
39efe0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.IO; | ||
using System.Reflection; | ||
|
||
namespace DotNet; | ||
|
||
static class ApplicationBase | ||
{ | ||
public static string GetEntryApplicationPath() | ||
{ | ||
#if NETFRAMEWORK | ||
// Single file publishing does not exist with .NET Framework so | ||
// we can just use reflection to get the entry assembly path. | ||
return Assembly.GetEntryAssembly().Location; | ||
#else | ||
// Assembly::Location always returns an empty string if the application | ||
// was published as a single file | ||
#pragma warning disable IL3000 | ||
bool isSingleFile = string.IsNullOrEmpty(Assembly.GetEntryAssembly()?.Location); | ||
#pragma warning restore IL3000 | ||
|
||
// Use "argv[0]" to get the full path to the entry executable in | ||
// .NET 5+ when published as a single file. | ||
string[] args = Environment.GetCommandLineArgs(); | ||
string candidatePath = args[0]; | ||
|
||
// If we have not been published as a single file then we must strip the | ||
// ".dll" file extension to get the default AppHost/SuperHost name. | ||
if (!isSingleFile && Path.HasExtension(candidatePath)) | ||
{ | ||
return Path.ChangeExtension(candidatePath, null); | ||
} | ||
|
||
return candidatePath; | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters