File tree Expand file tree Collapse file tree 3 files changed +23
-8
lines changed
src/Microsoft.DotNet.XHarness.CLI Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 5
5
using System ;
6
6
using System . Collections . Generic ;
7
7
using System . Linq ;
8
+ using System . Runtime . InteropServices ;
8
9
using Microsoft . DotNet . XHarness . CLI . Android ;
9
10
using Microsoft . DotNet . XHarness . CLI . Commands . iOS ;
10
11
using Microsoft . DotNet . XHarness . CLI . Commands . Wasm ;
@@ -39,7 +40,15 @@ public override int Invoke(IEnumerable<string> arguments)
39
40
PrintCommandHelp ( new AndroidCommandSet ( ) , subCommand ) ;
40
41
break ;
41
42
case "ios" :
42
- PrintCommandHelp ( new iOSCommandSet ( ) , subCommand ) ;
43
+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
44
+ {
45
+ PrintCommandHelp ( new iOSCommandSet ( ) , subCommand ) ;
46
+ }
47
+ else
48
+ {
49
+ Console . WriteLine ( $ "Command '{ command } ' could be run on OSX only.") ;
50
+ }
51
+
43
52
break ;
44
53
case "wasm" :
45
54
PrintCommandHelp ( new WasmCommandSet ( ) , subCommand ) ;
Original file line number Diff line number Diff line change 4
4
5
5
using System ;
6
6
using System . Linq ;
7
+ using System . Runtime . InteropServices ;
7
8
using Microsoft . DotNet . XHarness . CLI . Android ;
8
9
using Microsoft . DotNet . XHarness . CLI . Commands ;
9
10
using Microsoft . DotNet . XHarness . CLI . Commands . iOS ;
@@ -23,7 +24,6 @@ public static int Main(string[] args)
23
24
var commands = new CommandSet ( "xharness" )
24
25
{
25
26
// Add per-platform CommandSets - If adding a new supported set, that goes here.
26
- new iOSCommandSet ( ) ,
27
27
new AndroidCommandSet ( ) ,
28
28
new WasmCommandSet ( ) ,
29
29
@@ -32,6 +32,12 @@ public static int Main(string[] args)
32
32
new XHarnessVersionCommand ( ) ,
33
33
} ;
34
34
35
+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
36
+ {
37
+ commands . Add ( new iOSCommandSet ( ) ) ;
38
+ }
39
+
40
+
35
41
// Mono.Options wouldn't allow "--" and CommandSet parser will temporarily rename it
36
42
int result = commands . Run ( args . Select ( a => a == "--" ? XHarnessCommand . VerbatimArgumentPlaceholder : a ) ) ;
37
43
Console . WriteLine ( $ "XHarness exit code: { result } ") ;
Original file line number Diff line number Diff line change 1
1
{
2
- "profiles" : {
3
- "XHarness" : {
4
- "commandName" : " Project" ,
5
- "commandLineArgs" : " ios state"
6
- }
2
+ "profiles" : {
3
+ "XHarness" : {
4
+ "commandName" : " Project" ,
5
+ "commandLineArgs" : " help"
7
6
}
8
- }
7
+ }
8
+ }
You can’t perform that action at this time.
0 commit comments