summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--marktext-arg-handling.patch26
3 files changed, 35 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0f9ce08d7d7..bdfb9421ff6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = marktext
pkgdesc = A simple and elegant open-source markdown editor that focused on speed and usability
pkgver = 0.16.1
- pkgrel = 5
+ pkgrel = 6
url = https://marktext.app
arch = x86_64
license = MIT
@@ -17,8 +17,10 @@ pkgbase = marktext
depends = ripgrep
source = marktext-0.16.1.tar.gz::https://github.com/marktext/marktext/archive/v0.16.1.tar.gz
source = marktext.sh
+ source = marktext-arg-handling.patch
sha256sums = a00aa0caf26ab6e24e6cd5fef2a2a03e2ef46d0bf185c6971d9f00207223633e
sha256sums = c5af6eabe525af458df2ccfac6098092746dd0ae23225c131100bb6e37170f86
+ sha256sums = c754a1cad52d10a38eeddb9293ce0a4540296c6adbb47eb5311eaaeded150a01
pkgname = marktext
diff --git a/PKGBUILD b/PKGBUILD
index d4e2fd72302..0b32bd7ec77 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=marktext
pkgver=0.16.1
-pkgrel=5
+pkgrel=6
pkgdesc='A simple and elegant open-source markdown editor that focused on speed and usability'
arch=('x86_64')
url='https://marktext.app'
@@ -22,9 +22,11 @@ makedepends=('jq'
'yarn'
'yq')
source=("$pkgname-$pkgver.tar.gz::https://github.com/marktext/marktext/archive/v${pkgver}.tar.gz"
- "$pkgname.sh")
+ "$pkgname.sh"
+ "$pkgname-arg-handling.patch")
sha256sums=('a00aa0caf26ab6e24e6cd5fef2a2a03e2ef46d0bf185c6971d9f00207223633e'
- 'c5af6eabe525af458df2ccfac6098092746dd0ae23225c131100bb6e37170f86')
+ 'c5af6eabe525af458df2ccfac6098092746dd0ae23225c131100bb6e37170f86'
+ 'c754a1cad52d10a38eeddb9293ce0a4540296c6adbb47eb5311eaaeded150a01')
_electronDist=$(dirname $(realpath $(which electron)))
_electronVersion=$(electron --version | sed -e 's/^v//')
@@ -38,6 +40,7 @@ prepare() {
mkdir -p "$srcdir/node_modules"
yarn --cache-folder "$srcdir/node_modules" install --frozen-lockfile
yarn --cache-folder "$srcdir/node_modules" add -D -E --no-lockfile --ignore-scripts electron@$_electronVersion
+ patch -p1 < "$srcdir/$pkgname-arg-handling.patch"
}
build() {
diff --git a/marktext-arg-handling.patch b/marktext-arg-handling.patch
new file mode 100644
index 00000000000..c77ff73a8d5
--- /dev/null
+++ b/marktext-arg-handling.patch
@@ -0,0 +1,26 @@
+From 067973c193f78729d4c3eb55d2132ce9c49f8a97 Mon Sep 17 00:00:00 2001
+From: Caleb Maclennan <caleb@alerque.com>
+Date: Thu, 23 Apr 2020 22:52:39 +0300
+Subject: [PATCH] patch-args
+
+Signed-off-by: Caleb Maclennan <caleb@alerque.com>
+---
+ src/main/cli/index.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main/cli/index.js b/src/main/cli/index.js
+index d306c409..1f07087e 100644
+--- a/src/main/cli/index.js
++++ b/src/main/cli/index.js
+@@ -10,7 +10,7 @@ const write = s => process.stdout.write(s)
+ const writeLine = s => write(s + '\n')
+
+ const cli = () => {
+- let argv = process.argv.slice(1)
++ let argv = process.argv.slice(2)
+ if (process.env.NODE_ENV === 'development') {
+ // Don't pass electron development arguments to Mark Text and change user data path.
+ argv = ['--user-data-dir', path.join(getPath('appData'), 'marktext-dev')]
+--
+2.26.2
+