pass in correct path

This commit is contained in:
Bryson Steck 2025-03-05 00:29:17 -07:00
parent f86fb79e73
commit db48ac41c9
Signed by: brysonsteck
SSH key fingerprint: SHA256:XpKABw/nP4z8UVaH+weLaBnEOD86+cVwif+QjuYLGT4

View file

@ -206,12 +206,12 @@ pub fn run(refractr: Refractr, cfgs: Vec<ConfigFile>) -> std::io::Result<()> {
// make initial clone
common::verbose(refractr.verbose, 1, format!("Cloning repository: {}", &cfg.config.from));
let repo_dir = &format!("{}/{}", &path_str, repo_name);
let repo_dir = format!("{}/{}", &path_str, repo_name);
let repo = match Repository::clone(&cfg.config.from, Path::new(&repo_dir)) {
Ok(repo) => repo,
Err(_) => {
eprintln!("refractr: warning: found existing repo at {}, attempting to use", repo_dir);
match fast_forward(&refractr, repo_dir, &cfg.config.branches) {
match fast_forward(&refractr, &repo_dir, &cfg.config.branches) {
Ok(_) => if let Ok(repo) = Repository::open(Path::new(&repo_dir)) {
repo
} else {
@ -229,7 +229,7 @@ pub fn run(refractr: Refractr, cfgs: Vec<ConfigFile>) -> std::io::Result<()> {
if cfg.config.schedule.enabled {
loop_repos.push(OpenedRepository {
repo,
path: path_str,
path: repo_dir,
remotes,
cfg: cfg.config
});