diff options
Diffstat (limited to 'tools/magrathea')
-rw-r--r-- | tools/magrathea/mg.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/magrathea/mg.scm b/tools/magrathea/mg.scm index 38447e930324..990fb87f90ba 100644 --- a/tools/magrathea/mg.scm +++ b/tools/magrathea/mg.scm @@ -168,9 +168,10 @@ USAGE (or mg--repository-root (begin (set! mg--repository-root - (string-chomp - (call-with-input-pipe "git rev-parse --show-toplevel" - (lambda (p) (read-string #f p))))) + (or (get-environment-variable "MG_ROOT") + (string-chomp + (call-with-input-pipe "git rev-parse --show-toplevel" + (lambda (p) (read-string #f p)))))) mg--repository-root))) ;; determine the current path relative to the root of the repository |