Title: [295296] trunk/Tools/Scripts/hooks
Revision
295296
Author
[email protected]
Date
2022-06-06 14:35:24 -0700 (Mon, 06 Jun 2022)

Log Message

Invoke perl in git hooks
https://bugs.webkit.org/show_bug.cgi?id=241345

Reviewed by Jonathan Bedard.

A windows command prompt doesn't understand shebangs and needs the interpreter to be specified in
order to run successfully.

* Tools/Scripts/hooks/pre-commit:
* Tools/Scripts/hooks/prepare-commit-msg:

Canonical link: https://commits.webkit.org/251341@main

Modified Paths

Diff

Modified: trunk/Tools/Scripts/hooks/pre-commit (295295 => 295296)


--- trunk/Tools/Scripts/hooks/pre-commit	2022-06-06 20:41:34 UTC (rev 295295)
+++ trunk/Tools/Scripts/hooks/pre-commit	2022-06-06 21:35:24 UTC (rev 295296)
@@ -31,7 +31,7 @@
         project_files.append(line)
 
 if project_files:
-    code = subprocess.run([os.path.join(SCRIPTS, 'sort-Xcode-project-file')] + project_files).returncode
+    code = subprocess.run(['perl', os.path.join(SCRIPTS, 'sort-Xcode-project-file')] + project_files).returncode
     if staged:
         code += subprocess.run(['git', 'add'] + project_files).returncode
     sys.exit(code)

Modified: trunk/Tools/Scripts/hooks/prepare-commit-msg (295295 => 295296)


--- trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-06-06 20:41:34 UTC (rev 295295)
+++ trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-06-06 21:35:24 UTC (rev 295296)
@@ -43,7 +43,7 @@
 
     try:
         for line in subprocess.check_output(
-            [os.path.join(SCRIPTS, 'prepare-ChangeLog'), '--no-write', '--only-files', '--delimiters'],
+            ['perl', os.path.join(SCRIPTS, 'prepare-ChangeLog'), '--no-write', '--only-files', '--delimiters'],
             **(dict(encoding='utf-8') if sys.version_info > (3, 0) else dict())
         ).splitlines():
             if line == '~':
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to