@@ -18,13 +18,13 @@ class HaxeManager {
18
18
case [" current" , []]: Sys .println (Utils .getCurrent ().or (" " ));
19
19
case [" current" , [" --name" ]]:
20
20
if (Sys .systemName () == " Windows" )
21
- throw " `hx current --name` is not supported on windows " ;
21
+ throw " `hx current --name` is not supported on Windows " ;
22
22
23
23
Sys .println (Utils .getCurrentName ().or (" " ));
24
24
25
25
case [" current" , [" --full" ]]:
26
26
if (Sys .systemName () == " Windows" )
27
- throw " `hx current --full` is not supported on windows " ;
27
+ throw " `hx current --full` is not supported on Windows " ;
28
28
29
29
Sys .println (Utils .getCurrentFull ().or (" " ));
30
30
@@ -47,7 +47,7 @@ class HaxeManager {
47
47
var BOLD = ANSI .set (Bold );
48
48
var BOLD_OFF = ANSI .set (BoldOff );
49
49
50
- Sys . println ( [
50
+ var lines = [
51
51
' ${ORANGE }hx - Haxe Manager cli tool ${RESET }' ,
52
52
' ${UNDERLINE }https://github.com/kLabz/haxe-manager ${UNDERLINE_OFF }' ,
53
53
' ' ,
@@ -63,20 +63,36 @@ class HaxeManager {
63
63
' or: ${ORANGE }hx select ${UNDERLINE }<VERSION> ${RESET }' ,
64
64
' Switch to installed Haxe version ${BOLD }VERSION ${BOLD_OFF }' ,
65
65
' ' ,
66
- ' or: ${ORANGE }hx current ${RESET }' ,
67
- ' or: ${ORANGE }hx current --name ${RESET }' ,
68
- ' or: ${ORANGE }hx current --full ${RESET }' ,
69
- ' Display current Haxe version string' ,
70
- ' ${BOLD }--name ${BOLD_OFF } will display the name under which this version has been installed' ,
71
- ' ${BOLD }--full ${BOLD_OFF } will display both name and version string' ,
72
- ' ' ,
66
+ ];
67
+
68
+ if (Sys .systemName () == " Windows" ) {
69
+ lines = lines .concat ([
70
+ ' or: ${ORANGE }hx current ${RESET }' ,
71
+ ' Display current Haxe version string' ,
72
+ ' ' ,
73
+ ]);
74
+ } else {
75
+ lines = lines .concat ([
76
+ ' or: ${ORANGE }hx current ${RESET }' ,
77
+ ' or: ${ORANGE }hx current --name ${RESET }' ,
78
+ ' or: ${ORANGE }hx current --full ${RESET }' ,
79
+ ' Display current Haxe version string' ,
80
+ ' ${BOLD }--name ${BOLD_OFF } will display the name under which this version has been installed' ,
81
+ ' ${BOLD }--full ${BOLD_OFF } will display both name and version string' ,
82
+ ' ' ,
83
+ ]);
84
+ }
85
+
86
+ lines = lines .concat ([
73
87
' or: ${ORANGE }hx list ${RESET }' ,
74
88
' Display all installed Haxe versions' ,
75
89
' ' ,
76
90
' or: ${ORANGE }hx --help ${RESET }' ,
77
91
' or: ${ORANGE }hx --help download ${RESET }' ,
78
92
' or: ${ORANGE }hx --help select ${RESET }' ,
79
93
' Display help about available commands'
80
- ].join (" \n " ));
94
+ ]);
95
+
96
+ Sys .println (lines .join (" \n " ));
81
97
}
82
98
}
0 commit comments