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