From b37fefb9df1e37bc187a10e6d08373371c69b0a3 Mon Sep 17 00:00:00 2001 From: Znuff Date: Tue, 26 Jul 2016 02:29:18 +0300 Subject: [PATCH] Fixes BOM marker with setup.bat on Windows (#2108) Currently, the Out-File PowerShell Cmdlet breaks config.ini by turning it into a Little Endian UTF-16 file, in turn breaking the script. Replaced the Out-File Cmdlet with a python in-line replace of a file (I mean, we already have python, so why not make full use of it...?) --- Easy Setup/setup.bat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Easy Setup/setup.bat b/Easy Setup/setup.bat index 466d2c696c..eac6ab6bd5 100644 --- a/Easy Setup/setup.bat +++ b/Easy Setup/setup.bat @@ -39,9 +39,8 @@ cd .. "%PATH2%\Scripts\pip" install -r requirements.txt "%PATH2%\Scripts\pip" install -r requirements.txt --upgrade cd config -copy config.ini.example config.ini set /p API= Enter your Google API key here: -powershell -Command "(gc config.ini) -replace '#gmaps-key:', 'gmaps-key: %API%' | Out-File config.ini" +"%PATH2%\python" -c "print open('config.ini.example').read().replace('#gmaps-key:','gmaps-key:%API%')" > config.ini echo All done! pause