about summary refs log tree commit diff
diff options
context:
space:
mode:
authorryneeverett <ryneeverett@gmail.com>2020-03-24 14:46:07 +0000
committerryneeverett <ryneeverett@gmail.com>2020-03-24 15:11:46 +0000
commitcffb6cb63762d0ddc5f7470b783159672ed683b1 (patch)
tree41b2b5481a0608baeba97b91f24a4cb6a8bbf8cf
parenta9c9b0d40c9de6084b928e6e8d97b1abef553f35 (diff)
downloadnixlib-cffb6cb63762d0ddc5f7470b783159672ed683b1.tar
nixlib-cffb6cb63762d0ddc5f7470b783159672ed683b1.tar.gz
nixlib-cffb6cb63762d0ddc5f7470b783159672ed683b1.tar.bz2
nixlib-cffb6cb63762d0ddc5f7470b783159672ed683b1.tar.lz
nixlib-cffb6cb63762d0ddc5f7470b783159672ed683b1.tar.xz
nixlib-cffb6cb63762d0ddc5f7470b783159672ed683b1.tar.zst
nixlib-cffb6cb63762d0ddc5f7470b783159672ed683b1.zip
vimPlugins: Update redirects without flag.
Per review, the input file will now be rewritten automatically if
redirects are found.
-rw-r--r--doc/languages-frameworks/vim.section.md2
-rwxr-xr-xpkgs/misc/vim-plugins/update.py16
2 files changed, 3 insertions, 15 deletions
diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md
index cd53926defeb..05a23d26cf2f 100644
--- a/doc/languages-frameworks/vim.section.md
+++ b/doc/languages-frameworks/vim.section.md
@@ -263,7 +263,7 @@ Sometimes plugins require an override that must be changed when the plugin is up
 
 To add a new plugin:
 
-  1. run `./update.py --update-redirects` and create a commit named "vimPlugins: Update",
+  1. run `./update.py` and create a commit named "vimPlugins: Update",
   2. add the new plugin to [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names) and add overrides if required to [overrides.nix](/pkgs/misc/vim-plugins/overrides.nix),
   3. run `./update.py` again and create a commit named "vimPlugins.[name]: init at [version]" (where `name` and `version` can be found in [generated.nix](/pkgs/misc/vim-plugins/generated.nix)), and
   4. create a pull request.
diff --git a/pkgs/misc/vim-plugins/update.py b/pkgs/misc/vim-plugins/update.py
index 9410f78be28a..c0ecd5d036e8 100755
--- a/pkgs/misc/vim-plugins/update.py
+++ b/pkgs/misc/vim-plugins/update.py
@@ -433,7 +433,7 @@ following steps:
     3. Make sure the updated {input_file} is still correctly sorted:
             sort -udf ./vim-plugin-names > sorted && mv sorted vim-plugin-names
     4. Run this script again so these changes will be reflected in the
-    generated expressions (no need to use the --update-redirects flag again):
+    generated expressions:
             ./update.py
     5. Commit {input_file} along with aliases and generated expressions:
             git add {output_file} {input_file} aliases.nix
@@ -463,12 +463,6 @@ def parse_args():
         default=DEFAULT_OUT,
         help="Filename to save generated nix code",
     )
-    parser.add_argument(
-        "--update-redirects",
-        dest="update_redirects",
-        action="store_true",
-        help="Update input file if repos have been redirected.",
-    )
 
     return parser.parse_args()
 
@@ -495,13 +489,7 @@ def main() -> None:
     generate_nix(plugins, args.outfile)
 
     if redirects:
-        if args.update_redirects:
-            update_redirects(args.input_file, args.outfile, redirects)
-        else:
-            print(
-                "Outdated vim-plugin-names found. Please run with "
-                "--update-redirects flag."
-            )
+        update_redirects(args.input_file, args.outfile, redirects)
 
 
 if __name__ == "__main__":