mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 01:08:31 +03:00
fix(cli-rs): keep the first scenario path in parity:sim without --sides
This commit is contained in:
@@ -49,7 +49,7 @@ setTimeout(() => {
|
||||
const argv = process.argv.slice(2)
|
||||
const sidesFlag = argv.indexOf("--sides")
|
||||
const sides = parseSides(sidesFlag === -1 ? undefined : argv[sidesFlag + 1])
|
||||
const files = argv.filter((arg, index) => !arg.startsWith("--") && index !== sidesFlag + 1)
|
||||
const files = argv.filter((arg, index) => !arg.startsWith("--") && (sidesFlag === -1 || index !== sidesFlag + 1))
|
||||
const scenarios = files.length
|
||||
? files.map((file) => path.resolve(file))
|
||||
: [...new Bun.Glob("scenarios/*/*.sim.ts").scanSync({ cwd: parityRoot, absolute: true })].toSorted()
|
||||
|
||||
Reference in New Issue
Block a user