Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for powershell script to finish, callback not working? #45

Open
evtk opened this issue Oct 17, 2016 · 2 comments
Open

Wait for powershell script to finish, callback not working? #45

evtk opened this issue Oct 17, 2016 · 2 comments

Comments

@evtk
Copy link

evtk commented Oct 17, 2016

Hello,

Great plugin, thanks!. Maybe I'm trying something impossible here, but let's give it a go. I'm using gulp-run to start up a powershell script that executes in a separate powershell window. I thought I could use the callback function to be able to have gulp-run to finish the task, after the powershell script has done it's job.. but can 't get it to work. I'm loading powershell with the 'Start-Process' command.

function deploy(done) {
 // some variable definitly left out (argumentlist)
  return run('Start-Process powershell.exe -ArgumentList ' + argumentList, { usePowerShell: true }).exec(function () {
    done();
  });
}
gulp.task('deploy', deploy);

This is the output, you can see it doesn't wait for completion:

[16:40:18] Starting 'deploy'...                                                                                                                                                                                    
[16:40:18] Finished 'deploy' after 543 ms                                                                                                                                                                          
$ Start-Process powershell.exe -ArgumentList etc....

Any thoughts on this? Thanks!

@hrishikeshtt
Copy link

Let me know do you have any updates on this ?

@evtk
Copy link
Author

evtk commented May 14, 2018

hi, sorry no updates to report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants