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

Improve error message for compiler errors on commands #167

Open
fhunleth opened this issue Nov 5, 2024 · 0 comments
Open

Improve error message for compiler errors on commands #167

fhunleth opened this issue Nov 5, 2024 · 0 comments

Comments

@fhunleth
Copy link
Member

fhunleth commented Nov 5, 2024

Here's an example:

$ ssh nerves.local 'cmd("ls")'
**Error** ** (CompileError) nofile: cannot compile file (errors have been logged)
    (elixir 1.17.2) src/elixir.erl:455: :elixir.quoted_to_erl/4
    (elixir 1.17.2) src/elixir.erl:332: :elixir.eval_forms/4
    (elixir 1.17.2) lib/module/parallel_checker.ex:112: Module.ParallelChecker.verify/1
    (elixir 1.17.2) lib/code.ex:572: Code.validated_eval_string/3
    (nerves_ssh 1.0.0) lib/nerves_ssh/exec.ex:23: NervesSSH.Exec.run/1
    (ssh 5.2.1) ssh_cli.erl:828: anonymous fn/4 in :ssh_cli.exec_in_self_group/5

The errors were logged, but it would be nice it they were returned. It would be nicer if the result looked like this:

$ ssh nerves.local 'cmd("ls")'
error: undefined function cmd/1 (there is no such import)
└─ iex:1

** (CompileError) cannot compile code (errors have been logged)
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

1 participant