cd: Set var via the string

This was meant to trigger the wcstring_list_t overload by constructing one with `{norm_dir}`. Older gcc can't figure out what to do.

So instead we use the wcstring overload for now.
This commit is contained in:
Fabian Homborg 2021-10-27 10:20:14 +02:00 committed by GitHub
parent 91a048596b
commit 6941c94c4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ maybe_t<int> builtin_cd(parser_t &parser, io_streams_t &streams, const wchar_t *
}
parser.libdata().cwd_fd = std::make_shared<const autoclose_fd_t>(std::move(dir_fd));
parser.set_var_and_fire(L"PWD", ENV_EXPORT | ENV_GLOBAL, {norm_dir});
parser.set_var_and_fire(L"PWD", ENV_EXPORT | ENV_GLOBAL, std::move(norm_dir));
return STATUS_CMD_OK;
}