-
Notifications
You must be signed in to change notification settings - Fork 739
Description
Node version (or tell us if you're using electron or some other framework):
Electron version 1.3.4
ShellJS version (the most recent version/Github branch you see the bug on):
Version 0.7.0
Operating system:
OS X El Capitan 10.11.16
Description of the bug:
I've created a small electron App which needs ffmpeg to convert a movie to a gif. Nothing special.
ffmpeg
is installed via homebrew
brew install ffmpeg
When I run my electron app local (without packaging) everything worked like expected.
But when I package my app with the electron-packager shelljs can't find ffmpeg
anymore. The code
is then 127
instead of 0
:(
Because your current documentation said that it run in sh
I've checked it here if ffmpeg
is missing. But the terminal output looks like this:
$ /bin/sh
sh-3.2$ which ffmpeg
/usr/local/bin/ffmpeg
I've also switched to bash
with the option shell
(see Example ShellJS command) but that doesn't help.
What I'm doing wrong? And why it's working without packaging but break with packaging?
Or isn't it an error in ShellJs? 💭
Example ShellJS command to reproduce the error:
I've als tested it with shell: '/bin/sh'
and shell: '/bin/bash'
nothing works.
exec('ffmpeg -i ' + filenames[0] + ' ' + path, {silent:true, async:true}, function(code, stdout, stderr) {
// Send error code to renderer to debug
loadingWin.webContents.executeJavaScript('console.log(' + code + ')')
}
Don't know if this a related issue #480