Skip to content
Myr

Merge pull request #301 from sephii/editor-bashism

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix bashism in get_editor()

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parents de40ee6, 58b5bee · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:click/_termui_impl.py+1 added-1 removed
347 unmodified lines
348 return rv349 if WIN:350 return 'notepad'351 for editor in 'vim', 'nano':352 if os.system('which %s &> /dev/null' % editor) == 0:352 if os.system('which %s >/dev/null 2>&1' % editor) == 0:353 return editor354 return 'vi'355356 def edit_file(self, filename):
153 unmodified lines