mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools: add support for VSELF_SHOULD_FAIL to v self
, in order to make testing all v up
failure modes easier.
This commit is contained in:
parent
c015f15d8d
commit
5f33585edf
@ -8,6 +8,12 @@ import v.util.recompilation
|
||||
const is_debug = os.args.contains('-debug')
|
||||
|
||||
fn main() {
|
||||
// make testing `v up` easier, by providing a way to force `v self` to fail,
|
||||
// to test the fallback logic:
|
||||
if os.getenv('VSELF_SHOULD_FAIL') != '' {
|
||||
eprintln('v self failed')
|
||||
exit(1)
|
||||
}
|
||||
// support a renamed `v` executable too:
|
||||
vexe := pref.vexe_path()
|
||||
vroot := os.dir(vexe)
|
||||
|
Loading…
Reference in New Issue
Block a user