Merge pull request #30 from facebookincubator/check-for-exe

Use .exe suffix on Windows.
This commit is contained in:
Pär Winzell 2017-10-31 11:49:10 -07:00 committed by GitHub
commit 21138b6eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ const binaries = {
function convert(srcFile, destFile, opts = []) {
return new Promise((resolve, reject) => {
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)) {
throw new Error(`Unsupported OS: ${os.type()}`);
}