Eliminate env_snapshot_t::current()

These uses are better served by passing in the real environment stack,
now that we have environment_t as a shared base class.
This commit is contained in:
ridiculousfish
2018-09-16 12:48:50 -07:00
parent 03b92ffe00
commit abcd24f716
9 changed files with 16 additions and 34 deletions

View File

@@ -10,6 +10,7 @@
#include "common.h"
#include "fallback.h" // IWYU pragma: keep
#include "io.h"
#include "parser.h"
#include "path.h"
#include "wgetopt.h"
#include "wutil.h" // IWYU pragma: keep
@@ -102,7 +103,7 @@ int builtin_command(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
}
} else {
wcstring path;
if (path_get_path(command_name, &path)) {
if (path_get_path(command_name, &path, parser.vars())) {
if (!opts.quiet) streams.out.append_format(L"%ls\n", path.c_str());
++found;
}