Content-Length: 346008 | pFad | http://github.com/postgresml/postgresml/commit/a64be9b81bb81c40aa232c65159aa9fe6500254c

75 Dont crash watch on error (#1241) · postgresml/postgresml@a64be9b · GitHub
Skip to content

Commit a64be9b

Browse files
authored
Dont crash watch on error (#1241)
1 parent a3a2401 commit a64be9b

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

packages/cargo-pgml-components/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cargo-pgml-components/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-pgml-components"
3-
version = "0.1.23"
3+
version = "0.1.24"
44
edition = "2021"
55
authors = ["PostgresML <team@postgresml.org>"]
66
license = "MIT"

packages/cargo-pgml-components/src/frontend/tools.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ pub fn debug() {
132132
}
133133

134134
pub fn watch() {
135+
rebuild();
136+
135137
let mut debouncer = unwrap_or_exit!(new_debouncer(
136138
Duration::from_secs(1),
137139
None,
@@ -156,9 +158,7 @@ pub fn watch() {
156158
}
157159

158160
if detected {
159-
print("changes detected, rebuilding...");
160161
rebuild();
161-
info("done");
162162
}
163163
}
164164

@@ -211,7 +211,12 @@ pub fn lint(check: bool) {
211211
}
212212

213213
fn rebuild() {
214-
unwrap_or_exit!(execute_command(
215-
Command::new("cargo").arg("pgml-components").arg("bundle")
216-
));
214+
print("changes detected, rebuilding...");
215+
match execute_command(Command::new("cargo").arg("pgml-components").arg("bundle")) {
216+
Ok(_) => info("ok"),
217+
Err(err) => {
218+
error("error");
219+
error!("{}", err);
220+
}
221+
}
217222
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgresml/postgresml/commit/a64be9b81bb81c40aa232c65159aa9fe6500254c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy