@@ -23,14 +23,14 @@ internal static class CommonOptions
23
23
IsHidden = true
24
24
} . ForwardAsProperty ( )
25
25
. AllowSingleArgPerToken ( ) ;
26
-
26
+
27
27
public static Option < VerbosityOptions > VerbosityOption =
28
28
new ForwardedOption < VerbosityOptions > (
29
29
new string [ ] { "-v" , "--verbosity" } ,
30
30
description : CommonLocalizableStrings . VerbosityOptionDescription )
31
- {
32
- ArgumentHelpName = CommonLocalizableStrings . LevelArgumentName
33
- } . ForwardAsSingle ( o => $ "-verbosity:{ o } ") ;
31
+ {
32
+ ArgumentHelpName = CommonLocalizableStrings . LevelArgumentName
33
+ } . ForwardAsSingle ( o => $ "-verbosity:{ o } ") ;
34
34
35
35
public static Option < VerbosityOptions > HiddenVerbosityOption =
36
36
new ForwardedOption < VerbosityOptions > (
@@ -47,15 +47,15 @@ public static Option<string> FrameworkOption(string description) =>
47
47
description )
48
48
{
49
49
ArgumentHelpName = CommonLocalizableStrings . FrameworkArgumentName
50
-
50
+
51
51
} . ForwardAsSingle ( o => $ "-property:TargetFramework={ o } ")
52
52
. AddCompletions ( Complete . TargetFrameworksFromProjectFile ) ;
53
53
54
54
private static string RuntimeArgName = CommonLocalizableStrings . RuntimeIdentifierArgumentName ;
55
55
private static Func < string , IEnumerable < string > > RuntimeArgFunc = o => new string [ ] { $ "-property:RuntimeIdentifier={ o } ", "-property:_CommandLineDefinedRuntimeIdentifier=true" } ;
56
56
private static CompletionDelegate RuntimeCompletions = Complete . RunTimesFromProjectFile ;
57
-
58
- public static Option < string > RuntimeOption =
57
+
58
+ public static Option < string > RuntimeOption =
59
59
new ForwardedOption < string > (
60
60
new string [ ] { "-r" , "--runtime" } )
61
61
{
@@ -72,7 +72,9 @@ public static Option<string> FrameworkOption(string description) =>
72
72
. AddCompletions ( RuntimeCompletions ) ;
73
73
74
74
public static Option < bool > CurrentRuntimeOption ( string description ) =>
75
- new ForwardedOption < bool > ( "--use-current-runtime" , description )
75
+ new ForwardedOption < bool > (
76
+ new string [ ] { "--ucr" , "--use-current-runtime" } ,
77
+ description )
76
78
. ForwardAs ( "-property:UseCurrentRuntimeIdentifier=True" ) ;
77
79
78
80
public static Option < string > ConfigurationOption ( string description ) =>
@@ -156,7 +158,7 @@ internal static string ArchOptionValue(ParseResult parseResult) =>
156
158
"--no-self-contained" ,
157
159
CommonLocalizableStrings . FrameworkDependentOptionDescription )
158
160
// Flip the argument so that if this option is specified we get selfcontained=false
159
- . SetForwardingFunction ( ( arg , p ) => ForwardSelfContainedOptions ( ! arg , p ) ) ;
161
+ . SetForwardingFunction ( ( arg , p ) => ForwardSelfContainedOptions ( ! arg , p ) ) ;
160
162
161
163
public static readonly Option < string > TestPlatformOption = new Option < string > ( "--Platform" ) ;
162
164
@@ -184,7 +186,7 @@ internal static IEnumerable<string> ResolveArchOptionToRuntimeIdentifier(string
184
186
// ResolveOsOptionToRuntimeIdentifier handles resolving the RID when both arch and os are specified
185
187
return Array . Empty < string > ( ) ;
186
188
}
187
-
189
+
188
190
var selfContainedSpecified = parseResult . HasOption ( SelfContainedOption ) || parseResult . HasOption ( NoSelfContainedOption ) ;
189
191
return ResolveRidShorthandOptions ( null , arg , selfContainedSpecified ) ;
190
192
}
@@ -231,7 +233,7 @@ public static string GetDotnetExeDirectory()
231
233
232
234
var dotnetRootPath = Path . GetDirectoryName ( Environment . ProcessPath ) ;
233
235
// When running under test the path does not always contain "dotnet".
234
- // The sdk folder is /d/ when run on helix because of space issues
236
+ // The sdk folder is /d/ when run on helix because of space issues
235
237
dotnetRootPath = Path . GetFileName ( dotnetRootPath ) . Contains ( "dotnet" ) || Path . GetFileName ( dotnetRootPath ) . Contains ( "x64" ) || Path . GetFileName ( dotnetRootPath ) . Equals ( "d" ) ? dotnetRootPath : Path . Combine ( dotnetRootPath , "dotnet" ) ;
236
238
return dotnetRootPath ;
237
239
}
0 commit comments