Cleanup
This commit is contained in:
parent
6f37e87a42
commit
0f21184bf6
4 changed files with 8 additions and 8 deletions
|
@ -10,7 +10,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
{
|
{
|
||||||
public interface IPackagedCommandSpecFactory
|
public interface IPackagedCommandSpecFactory
|
||||||
{
|
{
|
||||||
CommandSpec CreateCommandSpecFromRuntimeAssembly(
|
CommandSpec CreateCommandSpecFromLibrary(
|
||||||
LockFileTargetLibrary toolLibrary,
|
LockFileTargetLibrary toolLibrary,
|
||||||
string commandName,
|
string commandName,
|
||||||
IEnumerable<string> commandArguments,
|
IEnumerable<string> commandArguments,
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
{
|
{
|
||||||
public class PackagedCommandSpecFactory : IPackagedCommandSpecFactory
|
public class PackagedCommandSpecFactory : IPackagedCommandSpecFactory
|
||||||
{
|
{
|
||||||
public CommandSpec CreateCommandSpecFromRuntimeAssembly(
|
public CommandSpec CreateCommandSpecFromLibrary(
|
||||||
LockFileTargetLibrary toolLibrary,
|
LockFileTargetLibrary toolLibrary,
|
||||||
string commandName,
|
string commandName,
|
||||||
IEnumerable<string> commandArguments,
|
IEnumerable<string> commandArguments,
|
||||||
|
@ -35,9 +35,9 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isPortable = DetermineIfPortableApp(commandPath);
|
var isPortable = IsPortableApp(commandPath);
|
||||||
|
|
||||||
return CreateCommandSpecWrappingWithCorehostfDll(
|
return CreateCommandSpecWrappingWithCorehostIfDll(
|
||||||
commandPath,
|
commandPath,
|
||||||
commandArguments,
|
commandArguments,
|
||||||
depsFilePath,
|
depsFilePath,
|
||||||
|
@ -56,7 +56,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
return filePath;
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
private CommandSpec CreateCommandSpecWrappingWithCorehostfDll(
|
private CommandSpec CreateCommandSpecWrappingWithCorehostIfDll(
|
||||||
string commandPath,
|
string commandPath,
|
||||||
IEnumerable<string> commandArguments,
|
IEnumerable<string> commandArguments,
|
||||||
string depsFilePath,
|
string depsFilePath,
|
||||||
|
@ -134,7 +134,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
return new CommandSpec(commandPath, escapedArgs, commandResolutionStrategy);
|
return new CommandSpec(commandPath, escapedArgs, commandResolutionStrategy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool DetermineIfPortableApp(string commandPath)
|
private bool IsPortableApp(string commandPath)
|
||||||
{
|
{
|
||||||
var commandDir = Path.GetDirectoryName(commandPath);
|
var commandDir = Path.GetDirectoryName(commandPath);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
IEnumerable<string> commandArguments,
|
IEnumerable<string> commandArguments,
|
||||||
ProjectContext projectContext)
|
ProjectContext projectContext)
|
||||||
{
|
{
|
||||||
return _packagedCommandSpecFactory.CreateCommandSpecFromRuntimeAssembly(
|
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
||||||
toolLibrary,
|
toolLibrary,
|
||||||
commandName,
|
commandName,
|
||||||
commandArguments,
|
commandArguments,
|
||||||
|
|
|
@ -116,7 +116,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
var depsFileRoot = Path.GetDirectoryName(lockFile.LockFilePath);
|
var depsFileRoot = Path.GetDirectoryName(lockFile.LockFilePath);
|
||||||
var depsFilePath = GetToolDepsFilePath(toolLibraryRange, lockFile, depsFileRoot);
|
var depsFilePath = GetToolDepsFilePath(toolLibraryRange, lockFile, depsFileRoot);
|
||||||
|
|
||||||
return _packagedCommandSpecFactory.CreateCommandSpecFromRuntimeAssembly(
|
return _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
|
||||||
toolLibrary,
|
toolLibrary,
|
||||||
commandName,
|
commandName,
|
||||||
args,
|
args,
|
||||||
|
|
Loading…
Add table
Reference in a new issue