aboutsummaryrefslogtreecommitdiff
path: root/ktfmt.py
diff options
context:
space:
mode:
authorJordan Demeulenaere <jdemeulenaere@google.com>2022-10-07 13:00:31 +0200
committerJordan Demeulenaere <jdemeulenaere@google.com>2022-10-07 13:04:06 +0200
commit15ce9ec0ce87ce99edf30db6a4e3114884402266 (patch)
tree8500e0cfa2e4c4fe458d27c82ea57f8a9c8decae /ktfmt.py
parent75418db586a698ad4ae11ada2acee6a9d881fcec (diff)
downloadktfmt-15ce9ec0ce87ce99edf30db6a4e3114884402266.tar.gz
Use absolute paths when giving ktfmt formatting command
Bug: 235461679 Test: Manual Change-Id: I3ecab53dafbdf5cde3d6c1a7e817fc64941efb32
Diffstat (limited to 'ktfmt.py')
-rwxr-xr-xktfmt.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ktfmt.py b/ktfmt.py
index 6f115f7..88a8002 100755
--- a/ktfmt.py
+++ b/ktfmt.py
@@ -111,7 +111,9 @@ def main():
'Some Kotlin files are not properly formatted. Run the following command to format them:\n\n'
)
script_path = os.path.normpath(__file__)
- incorrect_files = stdout.decode('utf-8').splitlines()
+ incorrect_files = [
+ os.path.abspath(file) for file in stdout.decode('utf-8').splitlines()
+ ]
print('$ ' + script_path + ' ' + ' '.join(incorrect_files) + '\n')
print(
'**********************************************************************'