We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 436bd84 commit f3f2445Copy full SHA for f3f2445
src/haxelib/client/Main.hx
@@ -136,7 +136,13 @@ class Main {
136
}
137
138
function version() {
139
- Cli.print(VERSION_LONG);
+ // Print haxelib version when no arguments are given
140
+ if (mainArgs.length == 0) {
141
+ Cli.print(VERSION_LONG);
142
+ return;
143
+ }
144
+
145
+ Cli.print(getRepository().getCurrentVersion(ProjectName.ofString(mainArgs[0])));
146
147
148
static function combineAliases(name:String, aliases:Array<String>):String {
@@ -211,7 +217,7 @@ class Main {
211
217
Config => create(config, 0),
212
218
Path => create(path, null),
213
219
LibPath => create(libpath, null),
214
- Version => create(version, 0),
220
+ Version => create(version, 1),
215
221
Help => create(usage, 0),
216
222
223
#if !js
0 commit comments