Topic: Cannot execute scripts in plugin bundle

I plan to execute a shell script when I drop a file to DZ. As I am running a non MAS version I still get errors that the script cannot be executed (same goes with swift executables or any other executables).
The scripts are bundles with the plugin so they are in the same folder like the "action.rb" ruby file.

Invocation goes like

 $dz.begin("Starting some task...")
  # Below line switches the progress display to determinate mode so we can show progress
  output = `` #is executable (755)
  puts $?.success?
  puts "output is #{output}"

  # Below lines tell Dropzone to update the progress bar display

Error shows up like

/Users/tso/Library/Application Support/Dropzone 3/Actions/Confluence Upload.dzbundle/action.rb:38:in `exec': No such file or directory - /Users/tso/Library/Containers/com.aptonic.Dropzone3/Data/Library/Application (Errno::ENOENT)
    from /Users/tso/Library/Application Support/Dropzone 3/Actions/Confluence Upload.dzbundle/action.rb:38:in `dragged'
    from /Users/tso/Applications/Dropzone `call'
    from /Users/tsoApplications/Dropzone `<main>'

So any help will be greatly appreciated.


Re: Cannot execute scripts in plugin bundle

That error output indicates to me that you're still running the sandboxed (Mac App Store version) of Dropzone. I would close Dropzone and delete your version of Dropzone from your Applications folder and re-download from - you can verify that it's the non-Mac App Store version by checking if there is an 'Updates' tab in the Preferences. You definitely can't call other scripts or executables under the sandboxed version, so that's the first thing to fix.

Now, also you need to put a ./ in front of the call. So change your line calling to the following:

output = `./`

And make sure the file is inside the action bundle.

Hope that helps!

Re: Cannot execute scripts in plugin bundle

thank you for your quick response. I discovered that when I changed to the non MAS version, my bundle was in the sandboxed folder so I created a new bundle and the folder was not sandboxed any more. When I created a new bundle and copied my code, all went fine.