Skip to content

Commit ca73757

Browse files
authored
Merge pull request #1390 from github/dylan-smith/fix-path-combine
Fix for code scanning alert no. 984: Call to System.IO.Path.Combine
2 parents d7997e4 + 6a3e12f commit ca73757

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/OctoshiftCLI.IntegrationTests/TestHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public async Task ResetGithubTestEnvironment(string githubOrg)
158158

159159
public async Task InitializeBbsRepo(string bbsProjectKey, string repoName)
160160
{
161-
var repoPath = Path.Combine(Path.GetTempPath(), $"{repoName}-{Guid.NewGuid()}");
161+
var repoPath = Path.Join(Path.GetTempPath(), $"{repoName}-{Guid.NewGuid()}");
162162

163163
Directory.CreateDirectory(repoPath);
164164

src/ado2gh/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static async Task Main(string[] args)
8282

8383
private static void WarnIfNotUsingExtension()
8484
{
85-
if (!Path.TrimEndingDirectorySeparator(AppContext.BaseDirectory).EndsWith(Path.Combine("extensions", "gh-ado2gh").ToString()))
85+
if (!Path.TrimEndingDirectorySeparator(AppContext.BaseDirectory).EndsWith(Path.Join("extensions", "gh-ado2gh")))
8686
{
8787
Logger.LogWarning("You are not running the ado2gh CLI as a gh extension. This is not recommended, please run: gh extension install github/gh-ado2gh");
8888
}

0 commit comments

Comments
 (0)