Skip to content

Commit cd9e6bc

Browse files
Fix CI workflow: change 'hk ci' to 'hk run ci'
The hk tool doesn't have a 'ci' subcommand. The correct command is 'hk run ci' to run the ci hook defined in hk.pkl.
1 parent e2b047e commit cd9e6bc

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
hk install --mise
6161
6262
- name: Run hk ci workflow
63-
run: hk ci
63+
run: hk run ci
6464

6565
security_audit:
6666
name: Security Audit

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![doc = r#"
1+
#![doc = r"
22
Configuration types and utilities for submod.
33
44
Defines serializable wrappers for git submodule options, project-level defaults, and submodule
@@ -18,7 +18,7 @@ Features:
1818
1919
TODO:
2020
- Add validation for config values when loading from file.
21-
"#]
21+
"]
2222

2323
use anyhow::{Context, Result};
2424
use bstr::BStr;

src/gitoxide_manager.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![doc = r#"
1+
#![doc = r"
22
# Gitoxide-Based Submodule Manager
33
44
Provides core logic for managing git submodules using the [`gitoxide`](https://github.com/Byron/gitoxide) library, with fallbacks to `git2` and the Git CLI when needed. Supports advanced features like sparse checkout and TOML-based configuration.
@@ -42,7 +42,7 @@ All operations return [`SubmoduleError`](src/gitoxide_manager.rs:14) for consist
4242
## Usage
4343
4444
Use this module as the backend for CLI commands to manage submodules in a repository. See the project [README](README.md) for usage examples and configuration details.
45-
"#]
45+
"]
4646

4747
use crate::config::{Config, SubmoduleConfig, SubmoduleGitOptions};
4848
use gix::Repository;
@@ -387,33 +387,35 @@ impl GitoxideSubmoduleManager {
387387

388388
// Clean up any existing broken submodule state
389389
let target_path = std::path::Path::new(workdir).join(path);
390-
390+
391391
// Always try to clean up, even if the directory doesn't exist
392392
// because there might be git metadata left behind
393-
393+
394394
// Try to deinitialize the submodule first
395395
let _ = Command::new("git")
396396
.args(["submodule", "deinit", "-f", path])
397397
.current_dir(workdir)
398398
.output();
399-
399+
400400
// Remove the submodule from .gitmodules and .git/config
401401
let _ = Command::new("git")
402402
.args(["rm", "-f", path])
403403
.current_dir(workdir)
404404
.output();
405-
405+
406406
// Remove the directory if it exists
407407
if target_path.exists() {
408408
let _ = std::fs::remove_dir_all(&target_path);
409409
}
410-
410+
411411
// Clean up git modules directory
412-
let git_modules_path = std::path::Path::new(workdir).join(".git/modules").join(path);
412+
let git_modules_path = std::path::Path::new(workdir)
413+
.join(".git/modules")
414+
.join(path);
413415
if git_modules_path.exists() {
414416
let _ = std::fs::remove_dir_all(&git_modules_path);
415417
}
416-
418+
417419
// Also try to clean up parent directories in git modules if they're empty
418420
if let Some(parent) = git_modules_path.parent() {
419421
let _ = std::fs::remove_dir(parent); // This will only succeed if empty

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![doc = r#"
1+
#![doc = r"
22
Main entry point for the submod CLI tool.
33
44
Parses command-line arguments and dispatches submodule management commands using the
@@ -15,7 +15,7 @@ and syncing submodules with advanced features like sparse checkout.
1515
- `sync`: Run check, init, and update in sequence.
1616
1717
Exits with an error if any operation fails.
18-
"#]
18+
"]
1919

2020
mod commands;
2121
mod config;

tests/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl TestHarness {
207207
// Check if push was successful
208208
if !push_output.status.success() {
209209
let stderr = String::from_utf8_lossy(&push_output.stderr);
210-
return Err(format!("Failed to push to remote: {}", stderr).into());
210+
return Err(format!("Failed to push to remote: {stderr}").into());
211211
}
212212

213213
Ok(remote_dir)

0 commit comments

Comments
 (0)