Skip to content

Commit 5bddf79

Browse files
committed
Correctly determine arch for windows builds
1 parent 05bed2f commit 5bddf79

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Gruntfile.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* jshint node:true */
22
'use strict';
33
module.exports = function (grunt) {
4-
54
var os = require('os');
65
var config = {
76
pkg: grunt.file.readJSON('package.json'),
@@ -13,6 +12,10 @@ module.exports = function (grunt) {
1312
platform: process.platform.replace('win32', 'windows'),
1413
};
1514

15+
if (process.platform.match(/^win/)) {
16+
config.arch = process.env.hasOwnProperty('ProgramFiles(x86)') ? 'x64' : 'x86';
17+
}
18+
1619
config.pkg.version = grunt.option('pkgVer') || config.pkg.version;
1720

1821
// load plugins
@@ -35,7 +38,6 @@ module.exports = function (grunt) {
3538

3639
// Merge that object with what with whatever we have here
3740
loadConfig(config,'./tasks/options/');
38-
3941
// pass the config to grunt
4042
grunt.initConfig(config);
4143
};

0 commit comments

Comments
 (0)