fix setup of mmdc, check it later.

This commit is contained in:
geekan 2023-07-03 11:23:00 +08:00
parent 84f55a6df7
commit 3ede3e3990

View file

@ -14,7 +14,10 @@ class InstallMermaidCLI(Command):
user_options = []
def run(self):
subprocess.check_call(['npm', 'install', '-g', '@mermaid-js/mermaid-cli'])
try:
subprocess.check_call(['sudo', 'npm', 'install', '-g', '@mermaid-js/mermaid-cli'])
except subprocess.CalledProcessError as e:
print(f"Error occurred: {e.output}")
here = path.abspath(path.dirname(__file__))