Skip to content

Commit

Permalink
cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kerenr-jfrog committed Jan 12, 2025
1 parent 5689562 commit c961b61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
4 changes: 0 additions & 4 deletions JFrogVSExtension/JFrogVSExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,6 @@
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0">
<Version>17.1.32210.191</Version>
</PackageReference>
<!--
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.10.0">
<Version>17.12.40391</Version>
</PackageReference> -->
<PackageReference Include="Microsoft.VSSDK.BuildTools">
<Version>17.12.2069</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion JFrogVSExtension/MainPanelControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public async Task LoadAsync()
{
if (isAllFilterChecked)
{
InitCheckbox();
InitCheckbox();
}
}

Expand Down
18 changes: 5 additions & 13 deletions JFrogVSExtension/Utils/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,9 @@ private static Project LoadNpmProject(string packageJsonPath)

var npmProj = JsonConvert.DeserializeObject<NpmLsNode>(npmProjectTree.Result);

//JoinableTaskFactory joinableTaskFactory = new JoinableTaskFactory(ThreadHelper.JoinableTaskContext);

//var npmProj = joinableTaskFactory.Run(async () =>
//{
// return await GetProcessOutputAsync("cmd.exe", "/C npm ls --json --all --long --package-lock-only", fileInfo.DirectoryName);
//});


var project = new Project()
{
name = $"{npmProj.name}:{npmProj.version}",
name = $"{npmProj.name}:{npmProj.version}",
directoryPath = fileInfo.DirectoryName,
dependencies = new Dependency[] { },
};
Expand Down Expand Up @@ -115,13 +107,13 @@ public static async Task<string> GetCLIOutputAsync(string command, string workin
var strFilePath = Path.Combine(strAppPath, "Resources");
var pathToCli = Path.Combine(strFilePath, "jfrog.exe");
await OutputLog.ShowMessageAsync("Path for the JFrog CLI: " + pathToCli);
return await Task.Run(async () => await GetProcessOutputAsync(pathToCli, command, workingDir, configCommand, envVars));
return await GetProcessOutputAsync(pathToCli, command, workingDir, configCommand, envVars);
}

public static async Task<string> GetProcessOutputAsync(string pathToExe, string command, string workingDir = "", bool configCommand = false, Dictionary<string, string> envVars = null)
{
//return await Task.Run(async () =>
//{
return await Task.Run(async () =>
{
//Create process
Process pProcess = new Process
{
Expand Down Expand Up @@ -217,7 +209,7 @@ public static async Task<string> GetProcessOutputAsync(string pathToExe, string
await OutputLog.ShowMessageAsync("Process timeout");
throw new IOException($"Process timeout, {pathToExe} {commandString}");
}
//});
});
}

private static string GetAssemblyLocalPathFrom(Type type)
Expand Down

0 comments on commit c961b61

Please sign in to comment.