Run gofmt via python, easier to debug

This commit is contained in:
Kovid Goyal
2022-08-16 14:47:27 +05:30
parent 4b69a600e5
commit 1429be3a19
2 changed files with 6 additions and 1 deletions

View File

@@ -130,6 +130,11 @@ def main():
package_kitty()
elif action == 'test':
test_kitty()
elif action == 'gofmt':
q = subprocess.check_output('gofmt -s -l tools version.go'.split())
if q.strip():
print(q.decode())
raise SystemExit(1)
else:
raise SystemExit(f'Unknown action: {action}')