From c3a1e90a323f785bd72b09779efbde50ac413030 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 23 Jan 2023 15:31:18 +0100 Subject: fixup! Fix access to internal components in kotlin --- bin/flycheck-android-kotlin.py | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'bin/flycheck-android-kotlin.py') diff --git a/bin/flycheck-android-kotlin.py b/bin/flycheck-android-kotlin.py index f8167c4..c42f5f4 100644 --- a/bin/flycheck-android-kotlin.py +++ b/bin/flycheck-android-kotlin.py @@ -94,22 +94,13 @@ def run_kotlinc(cp, files, output, args, sourcefile, outdir): command.append('-Xno-optimize') command.append(sourcefile) # Must include all source files or internal access will fail - if outdir: - with tempfile.NamedTemporaryFile(mode='w') as f: - command.append('@' + f.name) - for source in filter_source_files(files): - f.write(source) - f.write('\n') - f.flush() - return subprocess.call(command) - else: - with tempfile.NamedTemporaryFile(mode='w') as f: - command.append('@' + f.name) - for source in filter_source_files(files): - f.write(source) - f.write('\n') - f.flush() - return subprocess.call(command) + with tempfile.NamedTemporaryFile(mode='w') as f: + command.append('@' + f.name) + for source in filter_source_files(files): + f.write(source) + f.write('\n') + f.flush() + return subprocess.call(command) def file_in_list(needle, files): """Find needle in files and if so, return the list without needle. -- cgit v1.2.3-70-g09d2