Browse Source

Add test and don't throw errors (#37)

remotes/origin/add-simple-redirecting-site
Gal Schlezinger 6 years ago committed by GitHub
parent
commit
45a24051a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      executable/Install.re
  2. 11
      feature_tests/existing_installation/run.sh

9
executable/Install.re

@ -93,6 +93,15 @@ let run = (~version) =>
</Pastel>, </Pastel>,
) )
|> Lwt.return |> Lwt.return
| Versions.Already_installed(version) =>
Console.log(
<Pastel>
"Version "
<Pastel color=Pastel.Cyan> version </Pastel>
" is already installed."
</Pastel>,
)
|> Lwt.return
| Versions.Version_not_found(version) => | Versions.Version_not_found(version) =>
Console.log( Console.log(
<Pastel> <Pastel>

11
feature_tests/existing_installation/run.sh

@ -0,0 +1,11 @@
#!/bin/bash
eval `fnm env`
fnm install v8.11.3
fnm install v8.11.3 | grep "already installed"
if [ "$?" != "0" ]; then
echo "The second installation should say it is already installed"
exit 1
fi
Loading…
Cancel
Save