mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
Fix encoding error for Python 2
This commit is contained in:
parent
48808f93ac
commit
6b0311181d
@ -1,3 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from thefuck.rules.ln_no_hard_link import match, get_new_command
|
||||
from tests.utils import Command
|
||||
|
||||
|
@ -8,12 +8,10 @@ ln: ‘barDir’: hard link not allowed for directory
|
||||
"""
|
||||
|
||||
import re
|
||||
from thefuck.utils import for_app
|
||||
from thefuck.specific.sudo import sudo_support
|
||||
|
||||
|
||||
@sudo_support
|
||||
@for_app('ln')
|
||||
def match(command):
|
||||
return (command.stderr.endswith("hard link not allowed for directory") and
|
||||
command.script.startswith("ln "))
|
||||
|
Loading…
x
Reference in New Issue
Block a user