diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-05-02 20:54:28 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-05-03 09:39:25 -0400 |
| commit | 9bcf4097e33d8982b57c063f6481f7dd453bb0aa (patch) | |
| tree | 2d04df2d0663328160112f430bad072fd98e9e5f /src/test/codegen/src-hash-algorithm | |
| parent | f05a5240440b3eaef1684a7965860fab40301947 (diff) | |
| download | rust-9bcf4097e33d8982b57c063f6481f7dd453bb0aa.tar.gz rust-9bcf4097e33d8982b57c063f6481f7dd453bb0aa.zip | |
x.py: Give a more helpful error message if curl isn't installed
This also abstracts checking for a command into `require`.
Before:
```
Updating only changed submodules
Submodules updated in 0.01 seconds
Traceback (most recent call last):
File "./x.py", line 11, in <module>
bootstrap.main()
...
File "/home/joshua/src/rust/src/bootstrap/bootstrap.py", line 137, in run
ret = subprocess.Popen(args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
```
After:
```
error: unable to run `curl --version`: [Errno 2] No such file or directory
Please make sure it's installed and in the path.
```
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
