mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
Set non-zero exit codes for custom component build and install commands when failures occur (#9088)
* Exit codes * add changeset * Fix text --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
508ac84bc2
commit
96f8ffa5ee
5
.changeset/every-parks-count.md
Normal file
5
.changeset/every-parks-count.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Set non-zero exit codes for custom component build and install commands when failures occur
|
@ -162,7 +162,7 @@ def _build(
|
||||
live.update(":red_square: Build failed!")
|
||||
live.update(pipe.stderr)
|
||||
live.update(pipe.stdout)
|
||||
return
|
||||
raise SystemExit("Frontend build failed")
|
||||
else:
|
||||
live.update(":white_check_mark: Build succeeded!")
|
||||
|
||||
@ -172,6 +172,7 @@ def _build(
|
||||
if pipe.returncode != 0:
|
||||
live.update(":red_square: Build failed!")
|
||||
live.update(pipe.stderr)
|
||||
raise SystemExit("Python build failed")
|
||||
else:
|
||||
live.update(":white_check_mark: Build succeeded!")
|
||||
live.update(
|
||||
|
@ -71,6 +71,8 @@ def _install_command(
|
||||
if pipe.returncode != 0:
|
||||
live.update(":red_square: Python installation [bold][red]failed[/][/]")
|
||||
live.update(pipe.stderr)
|
||||
raise SystemExit("Python installation failed")
|
||||
|
||||
else:
|
||||
live.update(":white_check_mark: Python install succeeded!")
|
||||
|
||||
@ -85,6 +87,7 @@ def _install_command(
|
||||
live.update(":red_square: NPM install [bold][red]failed[/][/]")
|
||||
live.update(pipe.stdout)
|
||||
live.update(pipe.stderr)
|
||||
raise SystemExit("NPM install failed")
|
||||
else:
|
||||
live.update(":white_check_mark: NPM install succeeded!")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user