feat(hsr): add --from-version
This commit is contained in:
parent
7e18185b52
commit
c2f81637e2
@ -285,14 +285,19 @@ class UpdateCommand(Command):
|
|||||||
"auto-repair", "R", description="Automatically repair the game if needed"
|
"auto-repair", "R", description="Automatically repair the game if needed"
|
||||||
),
|
),
|
||||||
option("pre-download", description="Pre-download the game if available"),
|
option("pre-download", description="Pre-download the game if available"),
|
||||||
|
option("from-version", description="Update from a specific version"),
|
||||||
]
|
]
|
||||||
|
|
||||||
def handle(self):
|
def handle(self):
|
||||||
callback(command=self)
|
callback(command=self)
|
||||||
auto_repair = self.option("auto-repair")
|
auto_repair = self.option("auto-repair")
|
||||||
pre_download = self.option("pre-download")
|
pre_download = self.option("pre-download")
|
||||||
|
from_version = self.option("from-version")
|
||||||
if auto_repair:
|
if auto_repair:
|
||||||
self.line("<comment>Auto-repair is enabled.</comment>")
|
self.line("<comment>Auto-repair is enabled.</comment>")
|
||||||
|
if from_version:
|
||||||
|
self.line(f"Updating from version: <comment>{from_version}</comment>")
|
||||||
|
State.game.version_override = from_version
|
||||||
progress = utils.ProgressIndicator(self)
|
progress = utils.ProgressIndicator(self)
|
||||||
progress.start("Checking for updates... ")
|
progress.start("Checking for updates... ")
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user