Skip to content

Commit 46e9547

Browse files
whopiyushfourjr
authored andcommitted
Fix Plugins don't being updated if we force push on plugins repo (#268)
* make plugins update using force pull * revert force on git clone 😓 * make force update * Use fetch --all
1 parent 882d7ec commit 46e9547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cogs/plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ async def plugin_update(self, ctx, *, plugin_name: str):
304304
username, repo, name = self.parse_plugin(plugin_name)
305305

306306
try:
307-
cmd = f"cd plugins/{username}-{repo} && git pull"
307+
cmd = f"cd plugins/{username}-{repo} && git reset --hard origin/master && git fetch --all && git pull"
308308
cmd = await self.bot.loop.run_in_executor(
309309
None, self._asubprocess_run, cmd
310310
)

0 commit comments

Comments
 (0)