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

Hackium cli needs a quiet mode and a way to disable the REPL #54

Open
jsoverson opened this issue Sep 27, 2020 · 1 comment
Open

Hackium cli needs a quiet mode and a way to disable the REPL #54

jsoverson opened this issue Sep 27, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@jsoverson
Copy link
Owner

Hackium scripts that output data via console.log() can not output cleanly because hackium outputs at least one Info log, the return value of the hackium script, and the REPL prompt. The REPL also can't be easily closed programmatically and there should be an easier way to close the browser automatically.

sample script

test.js:

console.log(JSON.stringify({ test: "data" }));

Command

$ hackium -e test.js

Actual

Browser opens and stays open. REPL instantiates after script finishes and stays open.

Output:

{"test":"data"}
undefined
Info: Hackium launched
>

Expected

Browser closes automatically, REPL never opens (or closes, silently, on its own)

Output:

{"test":"data"}
@jsoverson jsoverson added the enhancement New feature or request label Sep 27, 2020
@jsoverson
Copy link
Owner Author

The REPL is good for troubleshooting and first-time users and may not be best as a default. It may make more sense to have an '--interactive' flag/option that turns on the REPL when running via CLI. For backwards compatibility maybe -e should turn interactive on by default and another flag should exist for dev-centric usage.

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

No branches or pull requests

1 participant