Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita64be9b

Browse files
authored
Dont crash watch on error (#1241)
1 parenta3a2401 commita64be9b

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 aboutcustomizing 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
pubfnwatch(){
135+
rebuild();
136+
135137
letmut 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
fnrebuild(){
214-
unwrap_or_exit!(execute_command(
215-
Command::new("cargo").arg("pgml-components").arg("bundle")
216-
));
214+
print("changes detected, rebuilding...");
215+
matchexecute_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)

[8]ページ先頭

©2009-2025 Movatter.jp