Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Conversation

lostintangent
Copy link
Member

This resolves #161 by ensuring that the ZIP generated by the release command is always deleted, regardless if the release fails (e.g. because the server rejected an identical release).

deleteFileIfTemporary(file);
})
.catch((error): void => {
deleteFileIfTemporary(file);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use .finally() instead of calling deleteFileIfTemporary() in two places

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to, but I decided to mirror what you did in the release-react command when deleting the temp folder. Since Promise.prototype.finally isn't standard, I kind of prefer doing this, but I'm happy either way.

@geof90
Copy link
Contributor

geof90 commented Mar 13, 2016

LGTM!

lostintangent added a commit that referenced this pull request Mar 13, 2016
Deleting release zip on erorr
@lostintangent lostintangent merged commit 190eed3 into master Mar 13, 2016
@lostintangent lostintangent deleted the delete_zip branch March 13, 2016 21:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] Is it possible to tell code-push cli to create archives in a separate directory?

4 participants