Write byte order mark and line terminator

PowerShell <= 5 needs a byte-order mark to identify non-local-eight-bit-encoded scripts.

I've interacted with enough things that yell at me for not terminating the final line of a script that I'm uncomfortable if I don't.
ini_importer_tests
AnyOldName3 1 year ago committed by Bret Curtis
parent 5576e4e9b7
commit 3bb8540f1d

@ -44,8 +44,8 @@ int runBinary(
std::filesystem::path psScriptPath = std::filesystem::temp_directory_path()
/ ("openmw_iniimporter_tests_" + std::to_string(std::time(nullptr)) + ".ps1");
std::wofstream psScriptFile(psScriptPath);
psScriptFile << L"& '" << binaryPath.native() << L"' -i '" << iniPath.native() << L"' -c '" << cfgPath.native()
<< "'";
psScriptFile << L"\uFEFF& '" << binaryPath.native() << L"' -i '" << iniPath.native() << L"' -c '" << cfgPath.native()
<< "'" << std::endl;
psScriptFile.close();
std::wstringstream psCmd;

Loading…
Cancel
Save