Skip to content

Commit 6249a2e

Browse files
committed
update, passes
1 parent 4e96dc1 commit 6249a2e

File tree

3 files changed

+160
-176
lines changed

3 files changed

+160
-176
lines changed

library/compiler-builtins/crates/josh-sync/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ publish = false
66
[dependencies]
77
anyhow = "1.0.98"
88
directories = "6.0.0"
9-
xshell = "0.2.7"

library/compiler-builtins/crates/josh-sync/src/main.rs

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::env;
22
use std::process::exit;
33

4-
use crate::sync::{GitSync, RustcPullError};
4+
use crate::sync::GitSync;
55

66
mod sync;
77

@@ -22,26 +22,9 @@ fn main() -> anyhow::Result<()> {
2222
let args: Vec<&str> = args.iter().map(|s| s.as_str()).collect();
2323

2424
match args.as_slice()[1..] {
25-
["rustc-pull"] => {
26-
if let Err(error) = sync.rustc_pull(None) {
27-
match error {
28-
RustcPullError::NothingToPull => {
29-
eprintln!("Nothing to pull");
30-
std::process::exit(2);
31-
}
32-
RustcPullError::PullFailed(error) => {
33-
eprintln!("Pull failure: {error:?}");
34-
std::process::exit(1);
35-
}
36-
}
37-
}
38-
}
39-
["rustc-push", github_user, branch] => {
40-
sync.rustc_push(github_user, Some(branch))?;
41-
}
42-
["rustc-push", github_user] => {
43-
sync.rustc_push(github_user, None)?;
44-
}
25+
["rustc-pull"] => sync.rustc_pull(None),
26+
["rustc-push", github_user, branch] => sync.rustc_push(github_user, Some(branch)),
27+
["rustc-push", github_user] => sync.rustc_push(github_user, None),
4528
_ => {
4629
println!("{USAGE}");
4730
exit(1);

0 commit comments

Comments
 (0)