Skip to content

entry is not always absolute while "fromFile" contract expects so #18

Description

@aasselin-en

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions