rapid7/metasploit-framework — pull request #2782 by OJ (2013-12-19 03:32:37+00:00)
Title: Stop abusing expand path

This PR contains commits which change use of `expand_path` to `getenv` where it makes the most sense. `getenv` is lighter-weight and can expand multiple variables at the same time. It is also a better choice for things that are not related to the file system, such as `USERNAME`.

* `sys.config.getenv` was renamed to `sys.config.getenvs` (note the `s` at the end) to indicate that it supports multiple, and this is the version of the function that returns a hash of the found envs.
* `sys.config.getenv` was created that takes a single argument. This calls `sys.config.getenvs` with a single arg and returns the value for that single arg.
* Lots of modules and scripts updated.
* A couple of modules were adjusted to work better, and the `download_exec` module was fixed up as it wasn't really working well before.

### Verification

- [ ] Each module works like it did before, or better.