You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
618 B
25 lines
618 B
6 years ago
|
open Nsw;
|
||
|
|
||
|
let run = () =>
|
||
|
Versions.Local.(
|
||
|
{
|
||
|
let%lwt versions = Versions.getInstalledVersions() |> Result.toLwt;
|
||
|
let currentVersion = Versions.getCurrentVersion();
|
||
|
|
||
|
Console.log("The following versions are installed:");
|
||
|
|
||
|
versions
|
||
|
|> Array.iter(version => {
|
||
|
let color =
|
||
|
switch (currentVersion) {
|
||
|
| None => None
|
||
|
| Some(x) when x.name == version.name => Some(Pastel.Cyan)
|
||
|
| Some(_) => None
|
||
|
};
|
||
|
Console.log(<Pastel ?color> "* " {version.name} </Pastel>);
|
||
|
});
|
||
|
|
||
|
Lwt.return();
|
||
|
}
|
||
|
);
|