JS backend: fix KT-6277 kotlinc-js: IllegalArgumentException when -output is a file name without directory prefix
#KT-6277 Fixed
This commit is contained in:
@@ -153,7 +153,11 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
||||
|
||||
OutputFileCollection outputFiles = translate(mainCallParameters, config, sourcesFiles, outputFile, outputPrefixFile, outputPostfixFile);
|
||||
|
||||
OutputUtilsPackage.writeAll(outputFiles, outputFile.getParentFile(), messageCollector);
|
||||
File outputDir = outputFile.getParentFile();
|
||||
if (outputDir == null) {
|
||||
outputDir = outputFile.getAbsoluteFile().getParentFile();
|
||||
}
|
||||
OutputUtilsPackage.writeAll(outputFiles, outputDir, messageCollector);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user