Thanks to visit codestin.com
Credit goes to github.com

Skip to content

blurb does not support command line options in EDITOR/GIT_EDITOR #2

Closed
@nirs

Description

@nirs

On windows users may like to configure their editor with options:

$ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession"

See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

blurb assume that EDITOR/GIT_EDITOR environment variables are executable names, so it will fail to run the user configured editor:

$ EDITOR="'foo bar' --baz" ../../core-workflow/blurb/blurb.py 
Traceback (most recent call last):
  File "../../core-workflow/blurb/blurb.py", line 1527, in <module>
    main()
  File "../../core-workflow/blurb/blurb.py", line 1487, in main
    sys.exit(fn(*filtered_args, **kwargs))
  File "../../core-workflow/blurb/blurb.py", line 804, in add
    subprocess.run([editor, tmp_path])
  File "/usr/lib64/python3.5/subprocess.py", line 383, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib64/python3.5/subprocess.py", line 676, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.5/subprocess.py", line 1282, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: "'foo bar' --baz"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions