Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot parse config.guess/config.sub #33

Open
khmseu opened this issue Jan 12, 2018 · 2 comments
Open

Cannot parse config.guess/config.sub #33

khmseu opened this issue Jan 12, 2018 · 2 comments

Comments

@khmseu
Copy link

khmseu commented Jan 12, 2018

Symptoms:

Unable to parse script
Unable to identify parsing failure (please include your full script in the bug report)
Please file a bug report at https://github.com/nfischer/shelljs-transpiler

Tested with versions
/usr/share/misc/config.guess:timestamp='2013-06-10'
/usr/share/misc/config.sub:timestamp='2013-08-10'
and
config.guess:timestamp='2018-01-11'
config.sub:timestamp='2018-01-11'

Current versions can be found at:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

@khmseu
Copy link
Author

khmseu commented Jan 12, 2018

It looks like the first line to break sh2js is

me=`echo "$0" | sed -e 's,.*/,,'`

@nfischer
Copy link
Owner

Yeah, that doesn't surprise me. ShellJS doesn't have great sed support (it only implements the s/ mode). The most reasonable fix would be for the transpiler to detect this and to fallback to shell.exec('sed ...') for non-s/ commands.

PRs are welcome, but I probably won't get to fixing this myself for a while.


The transpiler is far from complete, so we can't actually handle a script as complex as the ones you've linked to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants