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

Preserve newline from stdout and stderr #1109

Open
Nathan-SL opened this issue Nov 9, 2022 · 2 comments
Open

Preserve newline from stdout and stderr #1109

Nathan-SL opened this issue Nov 9, 2022 · 2 comments
Labels
exec Issues specific to the shell.exec() API

Comments

@Nathan-SL
Copy link

Node Version: v16.15.0
ShellJS: v0.8.5
OS: Mac

I can't seem to have the same output when it comes to newlines.
Running the command npx hardhat starknet-deploy

Output of from bash

Error in plugin Starknet: No starknet-network or gateway-url provided.

For more info run Hardhat with --show-stack-traces

Output from shelljs

Error in plugin Starknet: No starknet-network or gateway-url provided.
For more info run Hardhat with --show-stack-traces

Example ShellJS command to reproduce the error:

exec('npx hardhat starknet-deploy');
@nfischer
Copy link
Member

What is starknet-deploy?

Are you able to reproduce this with a simpler command, like echo foo or echo -e "foo\nbar"?

@nfischer nfischer added the exec Issues specific to the shell.exec() API label Nov 12, 2022
@nfischer
Copy link
Member

Also: what is the output of npx hardhat starknet-deploy > file.txt; cat file.txt? Sometimes commands behave differently if they're printing to console (TTY). Redirecting the output into a file and then displaying the contents of the file would rule out this possibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exec Issues specific to the shell.exec() API
Projects
None yet
Development

No branches or pull requests

2 participants