From 2a3bd3413f3ff17e8b50468cee638050763e4a10 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 29 Feb 2020 14:10:20 -0800 Subject: [PATCH] Add --ff-only to git pull command --- plexpy/versioncheck.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plexpy/versioncheck.py b/plexpy/versioncheck.py index 0c9cbadd..7ec34725 100644 --- a/plexpy/versioncheck.py +++ b/plexpy/versioncheck.py @@ -251,7 +251,8 @@ def update(): logger.info('Windows .exe updating not supported yet.') elif plexpy.INSTALL_TYPE == 'git': - output, err = runGit('pull ' + plexpy.CONFIG.GIT_REMOTE + ' ' + plexpy.CONFIG.GIT_BRANCH) + output, err = runGit('pull {} {} --ff-only'.format(plexpy.CONFIG.GIT_REMOTE, + plexpy.CONFIG.GIT_BRANCH)) if not output: logger.error('Unable to download latest version') @@ -270,7 +271,9 @@ def update(): return else: - tar_download_url = 'https://github.com/{}/{}/tarball/{}'.format(plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_REPO, plexpy.CONFIG.GIT_BRANCH) + tar_download_url = 'https://github.com/{}/{}/tarball/{}'.format(plexpy.CONFIG.GIT_USER, + plexpy.CONFIG.GIT_REPO, + plexpy.CONFIG.GIT_BRANCH) update_dir = os.path.join(plexpy.PROG_DIR, 'update') version_path = os.path.join(plexpy.PROG_DIR, 'version.txt')