@@ -26,9 +26,9 @@ function getOpamDownloadUrl(version: string, filename: string) {
2626
2727async function acquireOpamWindows ( version : string , customRepository : string ) {
2828 const repository =
29- customRepository === ""
30- ? "https://github.com/fdopen/opam-repository-mingw.git#opam2"
31- : customRepository ;
29+ customRepository ||
30+ "https://github.com/fdopen/opam-repository-mingw.git#opam2" ;
31+
3232 let downloadPath ;
3333 try {
3434 downloadPath = await tc . downloadTool ( "https://cygwin.com/setup-x86_64.exe" ) ;
@@ -57,9 +57,8 @@ async function acquireOpamLinux(version: string, customRepository: string) {
5757 const fileName = getOpamFileName ( opamVersion ) ;
5858 const downloadUrl = getOpamDownloadUrl ( opamVersion , fileName ) ;
5959 const repository =
60- customRepository === ""
61- ? "https://github.com/ocaml/opam-repository.git"
62- : customRepository ;
60+ customRepository || "https://github.com/ocaml/opam-repository.git" ;
61+
6362 let downloadPath ;
6463 try {
6564 downloadPath = await tc . downloadTool ( downloadUrl ) ;
@@ -85,9 +84,8 @@ async function acquireOpamLinux(version: string, customRepository: string) {
8584
8685async function acquireOpamDarwin ( version : string , customRepository : string ) {
8786 const repository =
88- customRepository === ""
89- ? "https://github.com/ocaml/opam-repository.git"
90- : customRepository ;
87+ customRepository || "https://github.com/ocaml/opam-repository.git" ;
88+
9189 await exec ( "brew" , [ "install" , "opam" ] ) ;
9290 await exec ( "opam" , [ "init" , "-yav" , repository ] ) ;
9391 await exec ( path . join ( __dirname , "install-ocaml-unix.sh" ) , [ version ] ) ;
0 commit comments