mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-11-04 09:02:08 +00:00 
			
		
		
		
	Replace raise with return for Ctrl+C in Windows
- Replace the raise `const.CtrlC` with `return const.CtrlC` the match the unix implementation and prevent a stacktrace when cancelling a command on Windows
This commit is contained in:
		@@ -16,7 +16,7 @@ def get_key():
 | 
			
		||||
        ch = msvcrt.getch()  # second call returns the actual key code
 | 
			
		||||
 | 
			
		||||
    if ch == b'\x03':
 | 
			
		||||
        raise const.KEY_CTRL_C
 | 
			
		||||
        return const.KEY_CTRL_C
 | 
			
		||||
    if ch == b'H':
 | 
			
		||||
        return const.KEY_UP
 | 
			
		||||
    if ch == b'P':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user