Skip to content

jflex/bin/jflex cannot resolves jar path. #251

Closed

Description

@fono09

Cause

$ echo $LANG
ja_JP.UTF-8
$ type /bin/sh
/bin/sh は /bin/sh です

Finally, $PRG equals です.

Solution

Force LANG=C

$ LANG=C type /bin/sh
/bin/sh is /bin/sh

or use dirname, pwd to resolve path.

Activity

  1. added a commit that references this issue on Nov 9, 2017
  2. lsf37 commented on Nov 9, 2017

    @lsf37
    Member

    Interesting. I think I fixed the problem by using $0 directly instead of type $0. dirname and pwd aren't good enough, because they don't resolve symlinks (and readlink doesn't work properly on MacOS).

    Would you be able to try out replacing the two lines

    PRG=`type $0`
    PRG=${PRG##* }
    

    with just PRG="$0" in jflex/bin/jflex?

  3. self-assigned this
    on Nov 10, 2017
  4. added this to the 1.7.0 milestone on Nov 10, 2017
  5. fono09 commented on Nov 12, 2017

    @fono09
    Author

    It fixed. Thank you!

  6. added a commit that references this issue on Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugNot working as intended

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions