From 7f9aa3318a9c0895ab2ff1c21d8a3f8fa27b1aef Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 31 Oct 2017 11:33:32 -0700 Subject: [PATCH] Use .exe suffix on Windows. --- npm/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npm/index.js b/npm/index.js index 3b4030c..7aa2d24 100644 --- a/npm/index.js +++ b/npm/index.js @@ -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()}`); }