mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[ImpellerC] Print the working directory that was tried when failing to open (flutter/engine#38079)
* Resolve language before working directory, print the working directory that was tried * Quotes
This commit is contained in:
parent
0485c8e365
commit
8f398c03bd
@ -130,10 +130,6 @@ Switches::Switches(const fml::CommandLine& command_line)
|
||||
"0"))),
|
||||
entry_point(
|
||||
command_line.GetOptionValueWithDefault("entry-point", "main")) {
|
||||
if (!working_directory || !working_directory->is_valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto language =
|
||||
command_line.GetOptionValueWithDefault("source-language", "glsl");
|
||||
std::transform(language.begin(), language.end(), language.begin(),
|
||||
@ -144,6 +140,10 @@ Switches::Switches(const fml::CommandLine& command_line)
|
||||
source_language = SourceLanguage::kHLSL;
|
||||
}
|
||||
|
||||
if (!working_directory || !working_directory->is_valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const auto& include_dir_path : command_line.GetOptionValues("include")) {
|
||||
if (!include_dir_path.data()) {
|
||||
continue;
|
||||
@ -196,7 +196,9 @@ bool Switches::AreValid(std::ostream& explain) const {
|
||||
}
|
||||
|
||||
if (!working_directory || !working_directory->is_valid()) {
|
||||
explain << "Could not figure out working directory." << std::endl;
|
||||
explain << "Could not open the working directory: \""
|
||||
<< Utf8FromPath(std::filesystem::current_path()).c_str() << "\""
|
||||
<< std::endl;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user