commit | 3e4aded87161e7684f1e48fbffaeb9c3e0df3d8e | [log] [tgz] |
---|---|---|
author | Todd Wang <toddw@google.com> | Tue Mar 01 17:51:56 2016 -0800 |
committer | Todd Wang <toddw@google.com> | Tue Mar 01 17:51:56 2016 -0800 |
tree | b3b390edbfa086f2eb7c1ef7ec55be1eefc60797 | |
parent | d25b44bdfa233c2f7bb79ae6f1973bc8ddd25689 [diff] |
lib: Use lookpath package consistently. Changes the signature of the lookpath functions to: Look(env map[string]string, ...) (string, error) LookPrefix(env map[string]string, ...) ([]string, error) The env map is passed in, rather than a slice of dirs, to facilitate supporting other platforms in the future. E.g. on windows we need to consult both the PATH and PATHDIRS environment variables. We now return an error, to more closely match LookPath in os/exec. The implementation of these methods has also changed, to more closely match the os/exec implementation. Also removed the copy of LookPath in runutil, and changed code to use the lookpath package instead. Fixes v.io/i/1157 MultiPart: 3/3 Change-Id: I3890f4debd8d519dc8d86eb4eed6759d9f6fd18e
This repository contains general purpose libraries used by the Vanadium project.