Skip to content

Commit

Permalink
Fixes BOM marker with setup.bat on Windows (#2108)
Browse files Browse the repository at this point in the history
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...?)
  • Loading branch information
Znuff authored and FrostTheFox committed Jul 25, 2016
1 parent 34ec2f6 commit b37fefb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Easy Setup/setup.bat
Expand Up @@ -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

0 comments on commit b37fefb

Please sign in to comment.