Skip to content

Commit 1d97c5f

Browse files
robin-muellerStefanFabian
authored andcommitted
Add basename key for sorting wtf hooks
1 parent 6e7d74e commit 1d97c5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/wtf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import argparse
44
import argcomplete
55
import subprocess
6+
from os.path import basename
67
from tuda_workspace_scripts.print import *
78
from tuda_workspace_scripts.scripts import get_hooks_for_command, load_method_from_file
89
from tuda_workspace_scripts.workspace import get_workspace_root
@@ -24,7 +25,7 @@ def main():
2425
return 1
2526

2627
count_fixes = 0
27-
hooks = list(sorted(get_hooks_for_command("wtf")))
28+
hooks = list(sorted(get_hooks_for_command("wtf"), key=basename))
2829
# Collect all wtf scripts in hooks/wtf folders of TUDA_WSS_SCRIPTS environment variable
2930
for script in hooks:
3031
# Load script and run fix command and obtain result

0 commit comments

Comments
 (0)