feat: add bsk CLI auto update

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
BB-fat
2026-07-08 14:14:00 +08:00
co-authored by Cursor
parent 647ae659b7
commit a7c48275f9
17 changed files with 2255 additions and 35 deletions
+11
View File
@@ -110,6 +110,17 @@ fn parses_install_skill_subcommand() {
assert!(matches!(cli.command, Command::InstallSkill(_)));
}
#[test]
fn parses_update_subcommand_with_flags() {
let cli = parse(&["bsk", "update", "--check", "--yes", "--no-restart-daemon"]);
let Command::Update(args) = cli.command else {
panic!("expected update subcommand");
};
assert!(args.check);
assert!(args.yes);
assert!(!args.restart_daemon);
}
#[test]
fn duration_parser_accepts_units() {
assert_eq!(parse_duration("750ms").unwrap(), Duration::from_millis(750));