summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@opera.com>2023-01-23 15:31:18 +0100
committerJoel Klinghed <the_jk@opera.com>2023-01-23 15:31:18 +0100
commitc3a1e90a323f785bd72b09779efbde50ac413030 (patch)
treebcd99ff1c6d385253cb360e1d844cdaa3d2557cf
parent0559f74d5939a56bd9016ff0b077dbad1a48a536 (diff)
fixup! Fix access to internal components in kotlin
-rw-r--r--bin/flycheck-android-kotlin.py23
1 files changed, 7 insertions, 16 deletions
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.