Update Gruntfile.js (#377)

This commit is contained in:
maxkadushkin 2020-04-06 16:11:44 +03:00 committed by GitHub
parent d330550d3d
commit 41cde55b5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,9 +12,12 @@ module.exports = function(grunt) {
' * Version: <%= pkg.version %> (build:<%= pkg.build %>)\n' + ' * Version: <%= pkg.version %> (build:<%= pkg.build %>)\n' +
' */\n'; ' */\n';
grunt.log.writeln('platform: ' + process.platform.green);
let iconv_lite, encoding = process.env.SYSTEM_ENCODING || 'win1251'; let iconv_lite, encoding = process.env.SYSTEM_ENCODING || 'win1251';
if (process.platform == 'win32') { if (process.platform == 'win32') {
const cmdencoding = require('child_process').execSync('chcp'); const cmdencoding = require('child_process').execSync('chcp');
grunt.log.writeln(cmdencoding);
if ( cmdencoding.includes('866') ) { if ( cmdencoding.includes('866') ) {
iconv_lite = require('iconv-lite'); iconv_lite = require('iconv-lite');
} }