Skip to content

[BUG] Run with CLI #904

Closed
Closed

Description

@BlackYuzia

Example

javascript-obfuscator index.js --config config.json # work
javascript-obfuscator --config config.json  index.js # error
# return: ReferenceError: Given input path must be a valid `.js` file or directory path

Expects

file what would be obfuscated should be parse fine. Flags, like --config or any else (like -o or --output and etc) shouldn't destroy command run if flags would be placed before js file.

Activity

  1. sanex3339 commented on Apr 7, 2021

    @sanex3339
    Member

    Hi. Hm. Currently i got the file path here:
    https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/src/cli/JavaScriptObfuscatorCLI.ts#L140

    Maybe I can change the logic to parse arguments and detect argument with the input file path

  2. sanex3339 commented on Apr 7, 2021

    @sanex3339
    Member

    Will fix it today. PR is almost ready.

  3. sanex3339 commented on Apr 7, 2021

    @sanex3339
    Member

    Released as 2.11.1

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions