prettydiff / biddle

Self-hosted application distribution
MIT License
66 stars 4 forks source link

Publishing updates with biddle broken #21

Closed prettydiff closed 7 years ago

prettydiff commented 7 years ago

Problems:

Observations:

prettydiff commented 7 years ago

Fixed with #20.

prettydiff commented 7 years ago

Executing PowerShell tasks on Windows through Node's child process is challenging to predict.

It appears that executing powershell command through the standard windows command shell is asynchronous much like executing Node. It appears powershell synchronously creates a shell to execute its commands asynchronously from the primary windows shell. Node is aware of when its child processes and its primary windows shell complete, but has no way of knowing when other shells complete their tasks particularly if they are also asynchronous.

The publish task uses the zip command internally, which in Windows means running a powershell task to execute 7zip. Currently its a guess when the task completes. The more zip files there are to create and the larger those files become the more inaccurate the guess becomes. The problem is that a Node callback for this task will either fire too early or never at all.