1

Hello to everyone and Happy New Year!

Since Gulp version 4 I can't run a shell script.

I have simple shell script.

if application id "com.adobe.estoolkit-4.0" is running then
    display dialog "Close The App!" buttons {"OK"} default button 1
end if

When I run it this way, it works

const { exec } = require('child_process');

function checkAppisOpen() {
    return exec('./utils/check.sh');
};

exports.run = checkAppisOpen;

But when I'm trying to use npm gulp-shell plugin it won't work.

Error: Did you forget to signal async completion?

See the code:

const shell = require('gulp-shell');

function checkAppisOpen() {
    return shell('./utils/check.sh');
};

exports.run = checkAppisOpen;

I know I'm doing something wrong. Could please someone explain how this async completion works under the hood. Or at least where I could read about it. Because it seems like gulp documentation is not enough for me https://gulpjs.com/docs/en/getting-started/async-completion

Vlad K.
  • 339
  • 1
  • 5
  • 15
  • It looks like the preferred way to use gulp.shell is via shell.task. What happens if you use return shell.task(….)? Otherwise try the callback function route: function checkAppisOpen(done) { return shell(…..); done(); }; – Mark Jan 03 '19 at 15:05
  • Thank you for the reply @Mark. Unfortunately, in both ways, you pointed, still the same result. The error is: The following tasks did not complete: run [02:21:56] Did you forget to signal async completion? – Vlad K. Jan 04 '19 at 00:23

0 Answers0