Skip to content

Commit

Permalink
fix(vim-patch.sh): run nvim with -u NONE -n neovim#16179
Browse files Browse the repository at this point in the history
Problem:
Because of -u NORC, vim-patch.sh would hang on my machine due to one of my
plugins (start package) waiting for prompt input.

Solution:
- Use -u NONE instead to disable all plugins.
- Also use -n to disable swapfiles. These changes only apply to the --headless
  nvim instances used to process things.
  • Loading branch information
seandewar committed Oct 30, 2021
1 parent c9e5c77 commit 97ae0ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/vim-patch.sh
Expand Up @@ -183,7 +183,7 @@ assign_commit_details() {
# Patch surgery
preprocess_patch() {
local file="$1"
local nvim="nvim -u NORC -i NONE --headless"
local nvim="nvim -u NONE -n -i NONE --headless"

# Remove Filelist, README
local na_files='Filelist\|README.*'
Expand Down Expand Up @@ -683,7 +683,7 @@ review_commit() {
msg_ok "Saved pull request diff to '${NVIM_SOURCE_DIR}/n${patch_file}'."
CREATED_FILES+=("${NVIM_SOURCE_DIR}/n${patch_file}")

local nvim="nvim -u NORC -n -i NONE --headless"
local nvim="nvim -u NONE -n -i NONE --headless"
2>/dev/null $nvim --cmd 'set dir=/tmp' +'1,/^$/g/^ /-1join' +w +q "${NVIM_SOURCE_DIR}/n${patch_file}"

local expected_commit_message
Expand Down

0 comments on commit 97ae0ab

Please sign in to comment.