Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created January 7, 2017 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayleedev/58d3f7c564c67e71acfa8fcb90e059c6 to your computer and use it in GitHub Desktop.
Save bayleedev/58d3f7c564c67e71acfa8fcb90e059c6 to your computer and use it in GitHub Desktop.
Scenario 1: happy path
git clone is successful
npm install is successful
restart zazu
next:
no action - be fast!
Scenario 2: git clone fails
git clone fails 3 times
npm install never happens
restart zazu
next:
retry git clone and npm install
Scenario 3: npm install fails
git clone success
npm install fails 3 times
restart zazu
next:
retry npm install
Scenario 4: update plugin
git clone is successful
npm install is successful
update plugins
git pull
npm install
original clone / every zazu open
if "calculator"
if "calculator" : "installed"
promise.resolve('exists')
else
promise.resolve('downloaded')
else
cleanup and try 3 times
if successful
write "calculator" : "cloned"
promise.resolve('downloaded')
else
write to log
promise.reject('meow')
npm install
try 3 times
if successful
write "calculator" : "installed"
promise.resolve()
else
write to log
promise.reject()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment