@@ -5,7 +5,7 @@ import { Entry, open } from "@xmcl/unzip";
5
5
import { createWriteStream } from "fs" ;
6
6
import { join } from "path" ;
7
7
import { DownloaderOption , installByProfileTask , InstallProfile , InstallProfileOption , LibraryOption , resolveLibraryDownloadUrls } from "./minecraft" ;
8
- import { downloadFileTask , getIfUpdate , InstallOptions as InstallOptionsBase , UpdatedObject , DefaultDownloader , HasDownloader , normailzeDownloader } from "./util" ;
8
+ import { downloadFileTask , getIfUpdate , InstallOptions as InstallOptionsBase , UpdatedObject , DefaultDownloader , HasDownloader , normailzeDownloader , normalizeArray } from "./util" ;
9
9
10
10
const { copyFile, ensureDir, ensureFile, unlink, waitStream, writeFile } = futils ;
11
11
@@ -108,7 +108,7 @@ function installByInstallerTask(version: RequiredVersion, minecraft: MinecraftLo
108
108
}
109
109
}
110
110
} ) ! ;
111
- let mavenHost = options . mavenHost ? [ ...options . mavenHost , DEFAULT_FORGE_MAVEN ] : [ DEFAULT_FORGE_MAVEN ] ;
111
+ let mavenHost = options . mavenHost ? [ ...normalizeArray ( options . mavenHost ) , DEFAULT_FORGE_MAVEN ] : [ DEFAULT_FORGE_MAVEN ] ;
112
112
let urls = resolveLibraryDownloadUrls ( library , { ...options , mavenHost } ) ;
113
113
114
114
context . update ( 0 , 120 ) ;
@@ -223,7 +223,7 @@ function installByUniversalTask(version: RequiredVersion, minecraft: MinecraftLo
223
223
}
224
224
}
225
225
} ) ! ;
226
- let mavenHost = options . mavenHost ? [ ...options . mavenHost , DEFAULT_FORGE_MAVEN ] : [ DEFAULT_FORGE_MAVEN ] ;
226
+ let mavenHost = options . mavenHost ? [ ... normalizeArray ( options . mavenHost ) , DEFAULT_FORGE_MAVEN ] : [ DEFAULT_FORGE_MAVEN ] ;
227
227
let urls = resolveLibraryDownloadUrls ( library , { ...options , mavenHost } ) ;
228
228
229
229
await context . execute ( Task . create ( "jar" , downloadFileTask ( {
0 commit comments