forked from gooberinc/goober
Improved updater
This commit is contained in:
parent
2c3946b67d
commit
991264620a
2 changed files with 2 additions and 4 deletions
|
@ -13,7 +13,7 @@ import psutil
|
||||||
import cpuinfo
|
import cpuinfo
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import updater
|
||||||
|
|
||||||
settings = settings_manager.settings
|
settings = settings_manager.settings
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ class BaseCommands(commands.Cog):
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def force_update(self, ctx: commands.Context):
|
async def force_update(self, ctx: commands.Context):
|
||||||
await ctx.send("Forcefully updating...")
|
await ctx.send("Forcefully updating...")
|
||||||
subprocess.run([sys.executable, sys.executable, "updater.py"])
|
updater.force_update()
|
||||||
os.execv(sys.executable, [sys.executable] + sys.argv)
|
os.execv(sys.executable, [sys.executable] + sys.argv)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,5 +14,3 @@ def force_update() -> None:
|
||||||
pull = subprocess.run(["git", "pull", "origin", "main"], check=True, capture_output=True)
|
pull = subprocess.run(["git", "pull", "origin", "main"], check=True, capture_output=True)
|
||||||
logger.info(pull)
|
logger.info(pull)
|
||||||
|
|
||||||
|
|
||||||
force_update()
|
|
Loading…
Add table
Add a link
Reference in a new issue