Nicer error message when sphinx-build is not in PATH
This commit is contained in:
parent
ab3b86d65b
commit
732108109e
@ -42,7 +42,13 @@ def complete(args):
|
|||||||
def launch(args):
|
def launch(args):
|
||||||
import runpy
|
import runpy
|
||||||
sys.argv = args[1:]
|
sys.argv = args[1:]
|
||||||
runpy.run_path(args[1], run_name='__main__')
|
exe = args[1]
|
||||||
|
if exe.startswith(':'):
|
||||||
|
import shutil
|
||||||
|
exe = shutil.which(exe[1:])
|
||||||
|
if not exe:
|
||||||
|
raise SystemExit('{} not found in PATH'.format(args[1][1:]))
|
||||||
|
runpy.run_path(exe, run_name='__main__')
|
||||||
|
|
||||||
|
|
||||||
def run_kitten(args):
|
def run_kitten(args):
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# You can set these variables from the command line.
|
# You can set these variables from the command line.
|
||||||
SPHINXOPTS = -T $(FAIL_WARN)
|
SPHINXOPTS = -T $(FAIL_WARN)
|
||||||
SPHINXBUILD = python3 .. +launch $(shell which sphinx-build)
|
SPHINXBUILD = python3 .. +launch :sphinx-build
|
||||||
SPHINXPROJ = kitty
|
SPHINXPROJ = kitty
|
||||||
SOURCEDIR = .
|
SOURCEDIR = .
|
||||||
BUILDDIR = _build
|
BUILDDIR = _build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user