Skip to content

Commit

Permalink
Merge pull request #17 from IBM/refactor/config-order
Browse files Browse the repository at this point in the history
refactor: look at project directory before home directory
  • Loading branch information
mamoonraja authored Sep 13, 2019
2 parents 684b901 + d53613a commit 91fa51c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Utilities/CredentialUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,36 +133,36 @@ private static List<string> 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);
Expand Down

0 comments on commit 91fa51c

Please sign in to comment.