mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-05 21:23:59 +03:00
fix: download to correct folder if custom is specified (#75)
download the .json and the jar to the custom folder if it is specified works with and without custom being set
This commit is contained in:
parent
5c29c67ee5
commit
9efda4b9f7
2 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ class Handler {
|
|||
}
|
||||
|
||||
async getJar () {
|
||||
await this.downloadAsync(this.version.downloads.client.url, this.options.directory, `${this.options.version.number}.jar`, true, 'version-jar')
|
||||
await this.downloadAsync(this.version.downloads.client.url, this.options.directory, `${this.options.version.custom ? this.options.version.custom : this.options.version.number}.jar`, true, 'version-jar')
|
||||
|
||||
fs.writeFileSync(path.join(this.options.directory, `${this.options.version.number}.json`), JSON.stringify(this.version, null, 4))
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class MCLCore extends EventEmitter {
|
|||
await this.handler.runInstaller(this.options.installer)
|
||||
}
|
||||
|
||||
const directory = this.options.overrides.directory || path.join(this.options.root, 'versions', this.options.version.number)
|
||||
const directory = this.options.overrides.directory || path.join(this.options.root, 'versions', this.options.version.custom ? this.options.version.custom : this.options.version.number)
|
||||
this.options.directory = directory
|
||||
|
||||
const versionFile = await this.handler.getVersion()
|
||||
|
|
Loading…
Reference in a new issue