Use .exe suffix on Windows.

This commit is contained in:
Michael Bayne 2017-10-31 11:33:32 -07:00
parent 58518f5e00
commit 7f9aa3318a
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ const binaries = {
function convert(srcFile, destFile, opts = []) { function convert(srcFile, destFile, opts = []) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
let tool = path.join(__dirname, 'bin', os.type(), 'FBX2glTF'); let binExt = os.type() === 'Windows_NT' ? '.exe' : '';
let tool = path.join(__dirname, 'bin', os.type(), 'FBX2glTF' + binExt);
if (!fs.existsSync(tool)) { if (!fs.existsSync(tool)) {
throw new Error(`Unsupported OS: ${os.type()}`); throw new Error(`Unsupported OS: ${os.type()}`);
} }