mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-07 08:27:12 +00:00
Fix sprite exec flag parsing and document E2E test instructions
Add `--` separator before `bash -c` in sprite exec args so the CLI stops parsing flags and doesn't interpret `-c` as its own flag. Also add E2E live test commands to CLAUDE.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
851edd2745
commit
1e376409ee
2 changed files with 7 additions and 3 deletions
|
|
@ -9,6 +9,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||
- `cargo test --workspace` — run all tests
|
||||
- `cargo test -p fabro-api` — test a single crate
|
||||
- `cargo test -p fabro-workflows -- test_name` — run a single test
|
||||
- `set -a && source .env && set +a && cargo test --workspace -- --ignored` — run all E2E live tests (requires credentials in `.env`, see `.env.example`)
|
||||
- `set -a && source .env && set +a && cargo test -p fabro-llm -- --ignored` — run E2E tests for a single crate
|
||||
- `cargo fmt --check --all` — check formatting
|
||||
- `cargo clippy --workspace -- -D warnings` — lint
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ impl SpritesSandbox {
|
|||
.ok_or_else(|| "Sprites sandbox not initialized — call initialize() first".to_string())
|
||||
}
|
||||
|
||||
/// Build args for `sprite exec -s <name> [-o org] bash -c <command>`.
|
||||
/// Build args for `sprite exec -s <name> [-o org] -- bash -c <command>`.
|
||||
fn build_exec_args(&self, command: &str) -> Result<Vec<String>, String> {
|
||||
let name = self.sprite_name()?;
|
||||
let mut args = vec!["exec".to_string(), "-s".to_string(), name.to_string()];
|
||||
|
|
@ -107,6 +107,7 @@ impl SpritesSandbox {
|
|||
args.push("-o".to_string());
|
||||
args.push(org.clone());
|
||||
}
|
||||
args.push("--".to_string());
|
||||
args.push("bash".to_string());
|
||||
args.push("-c".to_string());
|
||||
args.push(command.to_string());
|
||||
|
|
@ -754,8 +755,9 @@ mod tests {
|
|||
assert_eq!(recorded[0].args[0], "exec");
|
||||
assert_eq!(recorded[0].args[1], "-s");
|
||||
assert_eq!(recorded[0].args[2], "test-sprite");
|
||||
assert_eq!(recorded[0].args[3], "bash");
|
||||
assert_eq!(recorded[0].args[4], "-c");
|
||||
assert_eq!(recorded[0].args[3], "--");
|
||||
assert_eq!(recorded[0].args[4], "bash");
|
||||
assert_eq!(recorded[0].args[5], "-c");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue