diff --git a/ets2panda/util/diagnostic/warning.yaml b/ets2panda/util/diagnostic/warning.yaml index dcb80bf69a9a2f91e03f26c0b9a0f0b9c6212f5b..06c103a4c89bc79205d8f84975a2a2997e1e6abb 100644 --- a/ets2panda/util/diagnostic/warning.yaml +++ b/ets2panda/util/diagnostic/warning.yaml @@ -24,6 +24,14 @@ warning: - name: BOOST_EQUALITY_STATEMENT id: 4 message: "Boost Equality Statement. Change sides of binary expression." + +- name: CLI_OUTPUT_OPTION + id: 177420 + message: "The output path is set with cli --output argument '{}' instead of outDir in arktsconfig.json file." + +- name: DEFAULT_OUTPUT + id: 33177 + message: "Without cli --output argument, the output path is set with outDir in arktsconfig.json file '{}'." - name: DUPLICATE_EXPORT_ALIASES id: 73 diff --git a/ets2panda/util/options.cpp b/ets2panda/util/options.cpp index dbb5e1fbee52249f632b57df0dd2b8e7f290e9fa..aa0b15494381d7647a6b6f1c4c76cb118caf3144 100644 --- a/ets2panda/util/options.cpp +++ b/ets2panda/util/options.cpp @@ -191,7 +191,8 @@ bool Options::ParseInputOutput() return false; } } else { - SetOutput(ark::os::RemoveExtension(BaseName(SourceFileName())).append(".abc")); + std::string defaultOutput = ark::os::RemoveExtension(BaseName(SourceFileName())).append(".abc"); + SetOutput(defaultOutput); } return true;