浏览代码

put back check for browser, needed on Linux and/or when GRASS_HTML_BROWSER is unset or malformed

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56882 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 12 年之前
父节点
当前提交
9d25ce40e8
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      scripts/g.manual/g.manual.py

+ 3 - 0
scripts/g.manual/g.manual.py

@@ -46,6 +46,9 @@ import os
 from grass.script import core as grass
 
 def start_browser(entry):
+    if browser != 'xdg-open' and not grass.find_program(browser):
+        grass.fatal(_("Browser '%s' not found") % browser)
+
     path = os.path.join(gisbase, 'docs', 'html', entry + '.html')
     if not os.path.exists(path) and os.getenv('GRASS_ADDON_BASE'):
         path = os.path.join(os.getenv('GRASS_ADDON_BASE'), 'docs', 'html', entry + '.html')