summary refs log tree commit diff
diff options
context:
space:
mode:
authorLily Foster <lily@lily.flowers>2022-01-21 07:49:53 -0500
committerMatthieu Coudron <teto@users.noreply.github.com>2022-01-21 14:18:21 +0100
commitb6718ec0aa5e09ec294cc073b3c3c20c3353d58c (patch)
treebedf2e40229d171ac05472e5bbf9490d59e23b93
parenta247ac22526ff2122c6e7b120d36bb7d4be38109 (diff)
downloadnixpkgs-b6718ec0aa5e09ec294cc073b3c3c20c3353d58c.tar
nixpkgs-b6718ec0aa5e09ec294cc073b3c3c20c3353d58c.tar.gz
nixpkgs-b6718ec0aa5e09ec294cc073b3c3c20c3353d58c.tar.bz2
nixpkgs-b6718ec0aa5e09ec294cc073b3c3c20c3353d58c.tar.lz
nixpkgs-b6718ec0aa5e09ec294cc073b3c3c20c3353d58c.tar.xz
nixpkgs-b6718ec0aa5e09ec294cc073b3c3c20c3353d58c.tar.zst
nixpkgs-b6718ec0aa5e09ec294cc073b3c3c20c3353d58c.zip
pluginupdate.py: fix regression with plugin line splitting
Before 46c68ad both "@" and " as " could be used in the same line like
the following:

    vimwiki/vimwiki@dev as vimwiki-dev

After 46c68ad this gives an error due to the split URI still erroneously
including the " as [name]" at the end, due to splitting from the wrong
variable.
-rw-r--r--maintainers/scripts/pluginupdate.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/maintainers/scripts/pluginupdate.py b/maintainers/scripts/pluginupdate.py
index 2c487927a6e..de85b88da3f 100644
--- a/maintainers/scripts/pluginupdate.py
+++ b/maintainers/scripts/pluginupdate.py
@@ -470,10 +470,10 @@ def parse_plugin_line(line: str) -> PluginDesc:
     alias = None
     uri = line
     if " as " in uri:
-        uri, alias = line.split(" as ")
+        uri, alias = uri.split(" as ")
         alias = alias.strip()
-    if "@" in line:
-        uri, branch = line.split("@")
+    if "@" in uri:
+        uri, branch = uri.split("@")
 
     repo = make_repo(uri.strip(), branch.strip(), alias)