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

"Failed to invoke" in lix run can be a bit annoying #55

Open
Gama11 opened this issue Jan 19, 2020 · 1 comment
Open

"Failed to invoke" in lix run can be a bit annoying #55

Gama11 opened this issue Jan 19, 2020 · 1 comment

Comments

@Gama11
Copy link
Member

Gama11 commented Jan 19, 2020

All that "failed to invoke" output makes it harder to spot what's actually important at a glance:

It's not correct either. It didn't fail to invoke, the command it invoked simply had a non-zero exit code.

@mikicho
Copy link

mikicho commented Feb 9, 2020

I think all the failed to invoke part is redundant and is suitable mainly to debug haxeshim itself, the failed command should print the error if necessary and haxeshim don't need to log it too.
image

@back2dos what do you think about to remove the failed to invoke part from the message?
src/haxeshim/Exec.hx

  static public function sync(cmd:String, cwd:String, args:Array<String>, ?env:Env)
    return switch spawnSync(cmd, args, { cwd: cwd, stdio: 'inherit', env: mergeEnv(env) } ) {
      case { error: null, status: code }:
        Success(code);
      case { error: e, status: code }:
        Failure(new Error(code)); // The message removed
    }

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