mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-04-27 18:10:30 -04:00
aka: don't delete binaries in node_modules folder, since they shouldn't change anyways (unless the package is also updated)
26 lines
556 B
JavaScript
26 lines
556 B
JavaScript
/* eslint-env mocha */
|
|
|
|
'use strict';
|
|
|
|
const assert = require('assert');
|
|
const binCheck = require('bin-check');
|
|
const hugoBin = require('..');
|
|
const { execFile } = require('child_process');
|
|
|
|
it('Hugo exists and runs?', () => {
|
|
return binCheck(hugoBin, ['version']).then(works => {
|
|
assert(works);
|
|
|
|
// Print additional build environment variables if check successful
|
|
if (works) {
|
|
execFile(hugoBin, ['env'], (error, stdout) => {
|
|
if (error) {
|
|
throw error;
|
|
}
|
|
|
|
console.log(stdout);
|
|
});
|
|
}
|
|
});
|
|
});
|