mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
mach: ohos: Print error message when hvigor fails (#34267)
`hvigorw --version` might fail if some required environment variables are not set. In this case we should print the output of the command, so that the user can report what caused `hvigorw --version` to fail. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
dca33f681a
commit
0d2ce68d50
1 changed files with 6 additions and 0 deletions
|
@ -224,6 +224,12 @@ class PackageCommands(CommandBase):
|
|||
"path to hvigorw or set the HVIGOR_PATH environment variable to the npm"
|
||||
"installation containing `node_modules` directory with hvigor modules.")
|
||||
sys.exit(1)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"hvigor exited with the following error: {e}")
|
||||
print(f"stdout: `{e.stdout}`")
|
||||
print(f"stderr: `{e.stderr}`")
|
||||
sys.exit(1)
|
||||
|
||||
else:
|
||||
env["NODE_PATH"] = env["HVIGOR_PATH"] + "/node_modules"
|
||||
hvigor_script = f"{env['HVIGOR_PATH']}/node_modules/@ohos/hvigor/bin/hvigor.js"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue