From d53613ab37c684153cc68da41f3b413f866bce49 Mon Sep 17 00:00:00 2001 From: Mamoon Raja Date: Fri, 13 Sep 2019 11:21:23 -0400 Subject: [PATCH] refactor: look at project directory before home directory --- Utilities/CredentialUtils.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Utilities/CredentialUtils.cs b/Utilities/CredentialUtils.cs index 052377f..f0b209d 100644 --- a/Utilities/CredentialUtils.cs +++ b/Utilities/CredentialUtils.cs @@ -133,36 +133,36 @@ private static List GetFilesToCheck() files.Add(userSpecifedPath); } - if (!string.IsNullOrEmpty(unixHomeDirectory)) + if (!string.IsNullOrEmpty(projectDirectory)) { - var fullPath = Path.GetFullPath(Path.Combine(unixHomeDirectory, defaultCredentialFileName)); + var fullPath = Path.GetFullPath(Path.Combine(projectDirectory, defaultCredentialFileName)); if (File.Exists(fullPath)) { files.Add(fullPath); } } - if (!string.IsNullOrEmpty(windowsFirstHomeDirectory)) + if (!string.IsNullOrEmpty(unixHomeDirectory)) { - var fullPath = Path.GetFullPath(Path.Combine(windowsFirstHomeDirectory, defaultCredentialFileName)); + var fullPath = Path.GetFullPath(Path.Combine(unixHomeDirectory, defaultCredentialFileName)); if (File.Exists(fullPath)) { files.Add(fullPath); } } - if (!string.IsNullOrEmpty(windowsSecondHomeDirectory)) + if (!string.IsNullOrEmpty(windowsFirstHomeDirectory)) { - var fullPath = Path.GetFullPath(Path.Combine(windowsSecondHomeDirectory, defaultCredentialFileName)); + var fullPath = Path.GetFullPath(Path.Combine(windowsFirstHomeDirectory, defaultCredentialFileName)); if (File.Exists(fullPath)) { files.Add(fullPath); } } - if (!string.IsNullOrEmpty(projectDirectory)) + if (!string.IsNullOrEmpty(windowsSecondHomeDirectory)) { - var fullPath = Path.GetFullPath(Path.Combine(projectDirectory, defaultCredentialFileName)); + var fullPath = Path.GetFullPath(Path.Combine(windowsSecondHomeDirectory, defaultCredentialFileName)); if (File.Exists(fullPath)) { files.Add(fullPath);