Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/haxelib/client/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ class Main {
}

function version() {
Cli.print(VERSION_LONG);
// Print haxelib version when no arguments are given
if (mainArgs.length == 0) {
Cli.print(VERSION_LONG);
return;
}

Cli.print(getRepository().getCurrentVersion(ProjectName.ofString(mainArgs[0])));
}

static function combineAliases(name:String, aliases:Array<String>):String {
Expand Down Expand Up @@ -211,7 +217,7 @@ class Main {
Config => create(config, 0),
Path => create(path, null),
LibPath => create(libpath, null),
Version => create(version, 0),
Version => create(version, 1),
Help => create(usage, 0),

#if !js
Expand Down
Loading