Skip to content

Commit b09bbfb

Browse files
committed
Placed OS_CHECK func to proper place
1 parent 916995e commit b09bbfb

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/Utilities/current_vim_version_checker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
def check_current_vim_version_in_system():
77
print("current vim version in system")
88
command = "vim --version"
9-
# TODO: refactor, use subprocess.call, not safe
109
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
1110
stdout = []
1211

updater.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@
1717
from src.Utilities.installer import check_make_status
1818

1919
UPDATER_VER = "1.1"
20+
GIT_DOWNLOAD_PAGE = "http://git-scm.com/"
21+
VIM_DOWNLOAD_PAGE = "https://www.vim.org/download.php#pc"
22+
VIM_REPO = "https://github.com/vim/vim.git"
23+
OS_TYPE = check_os()
24+
25+
if OS_TYPE == "win":
26+
print("Windows don't fully supported yet")
27+
print("Please download vim here: {}".format(VIM_DOWNLOAD_PAGE))
28+
openBrowser(GIT_DOWNLOAD_PAGE)
29+
sys_exit(0)
30+
2031
isMakeInstalled = check_make_status()
2132

2233
parser = argparse.ArgumentParser()
@@ -25,7 +36,6 @@
2536
parser.add_argument("-v", "--version", action="version", version="vim updater {}".format(UPDATER_VER))
2637
args = parser.parse_args()
2738

28-
OS_TYPE = check_os()
2939
USER_FOLDER = path.expanduser("~")
3040
UPDATER_DIR = "/.vim_updater"
3141
VIM_FOLDER = "/vim"
@@ -50,12 +60,6 @@
5060
VIM_DOWNLOAD_PAGE = "https://www.vim.org/download.php#pc"
5161
VIM_REPO = "https://github.com/vim/vim.git"
5262

53-
if OS_TYPE == "win":
54-
print("Windows don't fully supported yet")
55-
print("Please download vim here: {}".format(VIM_DOWNLOAD_PAGE))
56-
openBrowser(GIT_DOWNLOAD_PAGE)
57-
sys_exit(0)
58-
5963
try:
6064
GIT_STATUS = check_git_on_device()
6165
except FileNotFoundError:

0 commit comments

Comments
 (0)