Skip to content

Commit

Permalink
Merge branch 'master' of github.com:shainer/chaser
Browse files Browse the repository at this point in the history
The two forks (ccr-tools/chaser and shainer/chaser) diverged.
  • Loading branch information
shainer committed Feb 18, 2017
2 parents 3c44d1f + cdc8210 commit a4fc14e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chaser/chaser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def get_source_files(args, workingdir=None):
pkgnames = args
workingdir = workingdir or BUILD_DIR

if os.getuid() == 0:
print('Downloading sources as root is not allowed. Exiting.')
return

if not os.path.exists(workingdir):
os.mkdir(workingdir)

Expand Down Expand Up @@ -95,6 +99,10 @@ def install(args):
pkgnames = args
workingdir = BUILD_DIR

if os.getuid() == 0:
print('Installations as root are not allowed. Exiting.')
return

print(_("resolving dependencies..."))

editor = os.getenv('EDITOR') or 'vim'
Expand Down Expand Up @@ -173,6 +181,10 @@ def list_updates(args=None):

def update(args):
"""Install updates"""
if os.getuid() == 0:
print('Updates as root are not allowed. Exiting.')
return

print(termcolor.colored(":: ", 'blue', attrs=['bold']) + \
termcolor.colored(_("Checking for updates..."), attrs=['bold']))
updates = check_updates()
Expand Down

0 comments on commit a4fc14e

Please sign in to comment.