Skip to content

Commit

Permalink
Don't crash if 'HOME' is unset in env. Bump version to 1.3.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
atdt committed Apr 16, 2014
1 parent e8777ec commit d8ba6e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions setup.py
Expand Up @@ -13,11 +13,10 @@
p = Popen(["make", "-C", make_dir])
os.waitpid(p.pid, 0)

# something better than this?
if os.getenv("USER") == "root":
config_dir = "/etc/phpsh"
else:
config_dir = os.getenv("HOME") + "/.phpsh"

config_dir = os.path.expanduser('~/.phpsh')
if config_dir == '~/.phpsh' or os.getuid() == 0:
config_dir = '/etc/phpsh'

setup(
name="phpsh",
Expand Down
4 changes: 2 additions & 2 deletions src/__init__.py
@@ -1,5 +1,5 @@
__version__ = "1.3.4"
__date__ = "Feb 13, 2014"
__version__ = "1.3.5"
__date__ = "April 15, 2014"

from subprocess import Popen, PIPE, call
from threading import Thread
Expand Down

0 comments on commit d8ba6e3

Please sign in to comment.