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

JavaScript version of the app can't handle starting arguments #6

Open
danon opened this issue Sep 7, 2020 · 0 comments
Open

JavaScript version of the app can't handle starting arguments #6

danon opened this issue Sep 7, 2020 · 0 comments

Comments

@danon
Copy link

danon commented Sep 7, 2020

In the build JS there's

///...
  var package$feature = package$com.feature || (package$com.feature = {});
  package$feature.main_kand9s$ = main;
  package$feature.Platform = Platform;
  main([]);
}));

You can see it calls main([]);

I don't understand why is that, since regardless if you call like like so

node test.js foo bar

or like so

./test.js foo bar

It's argument structure is always the same:

$ ./test.js foo bar
[ '/Users/danon/.nvm/versions/node/v10.17.0/bin/node',
  '/Users/danon/Projects/test.js',
  'foo',
  'bar' ]

Why couldn't kotlin compile it to JS

main(process.argv.slice(2));

JVM compiled version with the same Kotlin code does handle starting arguments.

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