Skip to content

fix(io): fix crash when EDITOR is a full command#23

Merged
efJerryYang merged 2 commits intoefJerryYang:mainfrom
drlkf:main
Apr 21, 2023
Merged

fix(io): fix crash when EDITOR is a full command#23
efJerryYang merged 2 commits intoefJerryYang:mainfrom
drlkf:main

Conversation

@drlkf
Copy link
Copy Markdown
Contributor

@drlkf drlkf commented Apr 20, 2023

when using a command with options as EDITOR e.g. emacsclient -nw, the editor command will crash the program:

FileNotFoundError: [Errno 2] No such file or directory: 'emacsclient -nw'

using shell=True in subprocess and formatting a command string from our parameters fixes this

when using a command with options as EDITOR e.g. `emacsclient -nw`, the `editor`
command will crash the program:

```
FileNotFoundError: [Errno 2] No such file or directory: 'emacsclient -nw'
```

using `shell=True` in `subprocess` and formatting a command string from our
parameters fixes this
Copy link
Copy Markdown
Owner

@efJerryYang efJerryYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this change with export EDITOR='code --wait' in my shell and it worked well.

Thanks for your contribution!

@efJerryYang efJerryYang merged commit 0d85e8e into efJerryYang:main Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants