Hello,
in the documentation of "fromFile" the "source" should always be an absolute path (so as to allow the startsWith to work), however it seems that in our conditions glob.sync will return a path relative to current working dir, even though the path specified in the configuration is absolute.
|
const source = PackageSourceManager.fromFile(entry, path.resolve(currentDir, target), root, |
https://github.com/mike-lischke/java2typescript/blob/b0f2057cbddcd2723bfe6c59bc922a9ed23eb7e4/src/PackageSourceManager.ts#L39C8-L39C9
I modified porduced code that way to make the tool work:
const source = PackageSourceManager.fromFile(path.resolve(currentDir, entry), path.resolve(currentDir, target), root, this.configuration.sourceReplace);
Best regards
Armel
Hello,
in the documentation of "fromFile" the "source" should always be an absolute path (so as to allow the startsWith to work), however it seems that in our conditions glob.sync will return a path relative to current working dir, even though the path specified in the configuration is absolute.
java2typescript/src/conversion/JavaToTypeScript.ts
Line 248 in b0f2057
https://github.com/mike-lischke/java2typescript/blob/b0f2057cbddcd2723bfe6c59bc922a9ed23eb7e4/src/PackageSourceManager.ts#L39C8-L39C9
I modified porduced code that way to make the tool work:
const source = PackageSourceManager.fromFile(path.resolve(currentDir, entry), path.resolve(currentDir, target), root, this.configuration.sourceReplace);
Best regards
Armel