diff --git a/rules/license-detectable-by-licensee.js b/rules/license-detectable-by-licensee.js index 2a9b280a..530dd26a 100644 --- a/rules/license-detectable-by-licensee.js +++ b/rules/license-detectable-by-licensee.js @@ -1,12 +1,13 @@ // Copyright 2017 TODO Group. All rights reserved. // Licensed under the Apache License, Version 2.0. +const isWindows = require('is-windows') const spawnSync = require('child_process').spawnSync module.exports = function (targetDir, options) { const expected = '\nLicense: ([^\n]*)' - const licenseeOutput = spawnSync('licensee', [targetDir]).stdout + const licenseeOutput = spawnSync(isWindows ? 'licensee.bat' : 'licensee', [targetDir]).stdout if (licenseeOutput == null) { return {