summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/emerge5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/emerge b/bin/emerge
index d73283963..4b1a56e7a 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -2618,7 +2618,10 @@ def show_blocker_docs_link():
def action_sync(settings, trees, mtimedb, myopts, myaction):
xterm_titles = "notitles" not in settings.features
emergelog(xterm_titles, " === sync")
- myportdir=settings["PORTDIR"]
+ myportdir = settings.get("PORTDIR", None)
+ if not myportdir:
+ sys.stderr.write("!!! PORTDIR is undefined. Is /etc/make.globals missing?\n")
+ sys.exit(1)
if myportdir[-1]=="/":
myportdir=myportdir[:-1]
if not os.path.exists(myportdir):