tools: make cmd/tools/vretry_test.v independent from the presence of git (fix issue #23398)

This commit is contained in:
Delyan Angelov 2025-01-13 08:10:13 +02:00
parent 89d405ec52
commit 3523c44f42
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED
2 changed files with 39 additions and 12 deletions

13
cmd/tools/check_retry.vsh Normal file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env -S v -raw-vsh-tmp-prefix tmp
// This script is used by cmd/tools/vretry_test.v, to check that the `v retry`
// subcommand works as expected, without relying on external commands like
// `git`, or on non portable ones like `true`/`false` or `echo`.
fn main() {
args := arguments()#[1..]
println(args)
if args == ['too', 'many', 'arguments'] {
exit(1)
}
}