Skip to content

Commit e0245ff

Browse files
authored
Fix test failure for windows (#3236)
1 parent c88046d commit e0245ff

File tree

1 file changed

+2
-1
lines changed
  • crates/chat-cli/src/cli/chat/tools/execute

1 file changed

+2
-1
lines changed

crates/chat-cli/src/cli/chat/tools/execute/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,12 +624,13 @@ mod tests {
624624
#[tokio::test]
625625
async fn test_eval_perm_denied_commands_invalid_regex() {
626626
let os = Os::new().await.unwrap();
627+
let tool_name = if cfg!(windows) { "execute_cmd" } else { "execute_bash" };
627628
let agent = Agent {
628629
name: "test_agent".to_string(),
629630
tools_settings: {
630631
let mut map = HashMap::<ToolSettingTarget, serde_json::Value>::new();
631632
map.insert(
632-
ToolSettingTarget("execute_bash".to_string()),
633+
ToolSettingTarget(tool_name.to_string()),
633634
serde_json::json!({
634635
"deniedCommands": ["^(?!ls$).*"] // Invalid regex with unsupported lookahead
635636
}),

0 commit comments

Comments
 (0)