-
Notifications
You must be signed in to change notification settings - Fork 3
fix: exit successfully when submitting a listed add-on #91
Conversation
@@ -46,14 +49,9 @@ const publish = async options => { | |||
}, | |||
{ signAddon }, | |||
) | |||
if (!success) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
success === false
is never returned from webExt.cmd.sign
. Instead an error is already thrown. https://github.com/mozilla/web-ext/blob/b27863dd6073e69e95faa853b6859e6337dcda6a/src/cmd/sign.js#L134-L141
fs.writeFileSync( | ||
path.join(artifactsDir, unsignedXpiFile), | ||
fs.readFileSync(params.xpiPath), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not use fs.copyFileSync
as it did not play well with unionfs
. See streamich/unionfs/issues/429
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's necessary to copy the file as the defaultAddonSigner
uses a temporary folder that gets cleaned up on success or failure.
|
||
module.exports = fs | ||
module.exports = ufs.use(vol).use(fs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combining memfs
and node fs
to allow tests mock and access to files written by web-ext
build step.
|
||
module.exports = fs | ||
const { createWriteStream } = ufs | ||
ufs.createWriteStream = (...args) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addresses streamich/unionfs/issues/428
🎉 This PR is included in version 0.2.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Complete fix from #88
Checklist
DevQA
N/A
Comments
N/A