-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Labels
Description
My node_modules
contain the fsevents
package, which depends on the host architecture.
The generated [Content-Types].xml
file (extracted from the VSIX extension) contains the following:
<Override ContentType="text/plain" PartName="/datadog-ci/node_modules/fsevents/LICENSE"/>
<Override ContentType="arm64):	application/x-mach-binary" PartName="/datadog-ci/node_modules/fsevents/fsevents.node"/>
You can see the mime type is wrong here, and because of this it's impossible to upload the VSIX file.
I get the following error when trying to upload:
A token is not valid. Refer to RFC 2616 for correct grammar of content types
Here is the output of the file --mime-type
command:
datadog-ci/node_modules/fsevents/fsevents.node: application/x-mach-binary
datadog-ci/node_modules/fsevents/fsevents.node (for architecture x86_64): application/x-mach-binary
datadog-ci/node_modules/fsevents/fsevents.node (for architecture arm64): application/x-mach-binary
Temporary workaround
# Only extract the problematic file, and fix it with `sed`.
unzip -p $EXTENSION_FILENAME '\[Content_Types\].xml' | sed 's/arm64):	//' > '[Content_Types].xml'
# Update the problematic file with the fixed one.
zip $EXTENSION_FILENAME '[Content_Types].xml'
LukeCarrier and lucas-paulger-sonarsource