Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit

Permalink
fix: normalize paths for gh and glab
Browse files Browse the repository at this point in the history
  • Loading branch information
humbertoyusta authored and olegklimov committed Dec 20, 2024
1 parent e7e762c commit 38ab999
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/integrations/integr_github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use serde::{Deserialize, Serialize};
use crate::at_commands::at_commands::AtCommandsContext;
use crate::call_validation::{ContextEnum, ChatMessage, ChatContent, ChatUsage};

use crate::files_correction::to_pathbuf_normalize;
use crate::tools::tools_description::Tool;
use serde_json::Value;
use crate::integrations::integr_abstract::{IntegrationCommon, IntegrationConfirmation, IntegrationTrait};
Expand Down Expand Up @@ -91,7 +92,7 @@ impl Tool for ToolGithub {
}
let output = Command::new(gh_binary_path)
.args(&command_args)
.current_dir(&project_dir)
.current_dir(&to_pathbuf_normalize(&project_dir))
.env("GH_TOKEN", &self.settings_github.gh_token)
.env("GITHUB_TOKEN", &self.settings_github.gh_token)
.output()
Expand Down
3 changes: 2 additions & 1 deletion src/integrations/integr_gitlab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use serde_json::Value;

use crate::at_commands::at_commands::AtCommandsContext;
use crate::call_validation::{ContextEnum, ChatMessage, ChatContent, ChatUsage};
use crate::files_correction::to_pathbuf_normalize;
use crate::tools::tools_description::Tool;
use crate::integrations::integr_abstract::{IntegrationCommon, IntegrationConfirmation, IntegrationTrait};

Expand Down Expand Up @@ -90,7 +91,7 @@ impl Tool for ToolGitlab {
}
let output = Command::new(glab_binary_path)
.args(&command_args)
.current_dir(&project_dir)
.current_dir(&to_pathbuf_normalize(&project_dir))
.env("GITLAB_TOKEN", &self.settings_gitlab.glab_token)
.output()
.await
Expand Down

0 comments on commit 38ab999

Please sign in to comment.