Skip to content

Commit 068e593

Browse files
[release/8.0] Use working directory as relative directory for project file resolution (#51974)
* Use working directory as relative directory for project file resolution * Address feedback and use primary constructors --------- Co-authored-by: Safia Abdalla <[email protected]>
1 parent 0fcdf91 commit 068e593

File tree

3 files changed

+76
-53
lines changed

3 files changed

+76
-53
lines changed

src/Tools/dotnet-user-jwts/src/Commands/CreateCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private static (JwtCreatorOptions, bool, string) ValidateArguments(
109109
CommandOption claimsOption)
110110
{
111111
var isValid = true;
112-
var finder = new MsBuildProjectFinder(projectOption.Value() ?? Directory.GetCurrentDirectory());
112+
var finder = new MsBuildProjectFinder(Directory.GetCurrentDirectory());
113113
var project = finder.FindMsBuildProject(projectOption.Value());
114114

115115
if (project == null)

src/Tools/dotnet-user-jwts/src/Helpers/DevJwtCliHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static string GetOrSetUserSecretsId(string projectFilePath)
2727

2828
public static bool GetProjectAndSecretsId(string projectPath, IReporter reporter, out string project, out string userSecretsId)
2929
{
30-
var finder = new MsBuildProjectFinder(projectPath ?? Directory.GetCurrentDirectory());
30+
var finder = new MsBuildProjectFinder(Directory.GetCurrentDirectory());
3131
project = finder.FindMsBuildProject(projectPath);
3232
userSecretsId = null;
3333
if (project == null)

0 commit comments

Comments
 (0)