|
@@ -6,6 +6,7 @@
|
|
|
@License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
|
|
|
@Desc : auto commit
|
|
|
"""
|
|
|
+from curses import window
|
|
|
import os
|
|
|
from auto_commit.utils.colors import bcolors
|
|
|
|
|
@@ -55,8 +56,10 @@ class AutoCommit(object):
|
|
|
for root, dirs, files in os.walk(self.params['path']):
|
|
|
if ".git" in dirs:
|
|
|
self._check(root)
|
|
|
- os.system("pause")
|
|
|
-
|
|
|
+ if os.name == "nt":
|
|
|
+ os.system("pause") # linux without this comoand
|
|
|
+ # else: # Linux or other Unix-like systems
|
|
|
+ # os.system("read -n 1 -s -r -p 'Press any key to continue...'")
|
|
|
|
|
|
def commit(self):
|
|
|
""" run """
|
|
@@ -66,7 +69,8 @@ class AutoCommit(object):
|
|
|
for root, dirs, files in os.walk(self.params['path']):
|
|
|
if ".git" in dirs:
|
|
|
self._commit(root)
|
|
|
- os.system("pause")
|
|
|
+ if os.name == "nt":
|
|
|
+ os.system("pause")
|
|
|
|
|
|
def sync(self):
|
|
|
""" sync """
|
|
@@ -76,4 +80,5 @@ class AutoCommit(object):
|
|
|
for root, dirs, files in os.walk(self.params['path']):
|
|
|
if ".git" in dirs:
|
|
|
self._sync(root)
|
|
|
- os.system("pause")
|
|
|
+ if os.name == "nt":
|
|
|
+ os.system("pause")
|