mirror of https://github.com/cheat/cheat.git
commit
64d331265e
|
@ -12,12 +12,6 @@ cheats = {}
|
||||||
def default_path():
|
def default_path():
|
||||||
""" Returns the default cheatsheet path """
|
""" Returns the default cheatsheet path """
|
||||||
|
|
||||||
# the default path becomes confused when cheat is run as root, so fail
|
|
||||||
# under those circumstances. (There is no good reason to need to run cheat
|
|
||||||
# as root.)
|
|
||||||
if os.name != 'nt' and os.geteuid() == 0:
|
|
||||||
die('Please do not run this application as root.');
|
|
||||||
|
|
||||||
# determine the default cheatsheet dir
|
# determine the default cheatsheet dir
|
||||||
default_sheets_dir = os.environ.get('DEFAULT_CHEAT_DIR') or os.path.join(os.path.expanduser('~'), '.cheat')
|
default_sheets_dir = os.environ.get('DEFAULT_CHEAT_DIR') or os.path.join(os.path.expanduser('~'), '.cheat')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue