Skip to content

Commit

Permalink
Merge pull request todogroup#35 from sschuberth/windows-licensee
Browse files Browse the repository at this point in the history
Support running licensee on Windows
  • Loading branch information
trevmex authored Jul 12, 2017
2 parents 8c1f338 + f511803 commit 7a4000c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rules/license-detectable-by-licensee.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 7a4000c

Please sign in to comment.