(env)
| 11 | SCons.Warnings.enableWarningClass(ToolCargoWarning) |
| 12 | |
| 13 | def _detect(env): |
| 14 | try: |
| 15 | return env['cargo'] |
| 16 | except KeyError: |
| 17 | pass |
| 18 | |
| 19 | cargo = env.WhereIs('cargo') |
| 20 | if cargo: |
| 21 | return cargo |
| 22 | |
| 23 | SCons.Warnings.warn(CargoNotFound, 'Could not detect cargo') |
| 24 | |
| 25 | def exists(env): |
| 26 | return env.Detect('cargo') |