ds300 / ds300/patch-package

Patch file parse error

Open
#310 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

```**ERROR** Failed to apply patch for package electron-builder


This happened because the patch file patches/electron-builder+22.9.1.patch could not be parsed.

If you just upgraded patch-package, you can try running:

patch -p1 -i patches/electron-builder+22.9.1.patch
```

```
--- a/node_modules/electron-builder/out/cli/install-app-deps.js
+++ b/node_modules/electron-builder/out/cli/install-app-deps.js
@@ -122,7 +122,7 @@
return yargs.parserConfiguration({
"camel-case-expansion": false
}).option("platform", {
- choices: ["linux", "darwin", "win32"],
+ choices: ["freebsd","linux", "darwin", "win32"],
default: process.platform,
description: "The target platform"
}).option("arch", {

```
It applies cleanly with patch:

```
patch -C -p1 -i patches/electron-builder+22.9.1.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/node_modules/electron-builder/out/cli/install-app-deps.js b/node_modules/electron-builder/out/cli/install-app-deps.js
|index 1ff7e89..e1b188c 100644
|--- a/node_modules/electron-builder/out/cli/install-app-deps.js
|+++ b/node_modules/electron-builder/out/cli/install-app-deps.js
--------------------------
Patching file node_modules/electron-builder/out/cli/install-app-deps.js using Plan A...
Hunk #1 succeeded at 122.
Hmm... Ignoring the trailing garbage.
done
```

Any clue?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.