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

libstore/ssh: Improve error message on failing `execvp` #3265

Merged

Conversation

@Profpatsch
Copy link
Member

@Profpatsch Profpatsch commented Dec 12, 2019

If the throw is reached, this means that execvp into ssh wasn’t
successful. We can hint at a usual problem, which is a missing ssh
executable.

Test with:

env PATH= ./result/bin/nix-copy-closure --builders '' unusedhost

and the bash version with

env PATH= ./result/bin/nix-copy-closure --builders '' localhost
If the `throw` is reached, this means that execvp into `ssh` wasn’t
successful. We can hint at a usual problem, which is a missing `ssh`
executable.

Test with:

```
env PATH= ./result/bin/nix-copy-closure --builders '' unusedhost
```

and the bash version with

```
env PATH= ./result/bin/nix-copy-closure --builders '' localhost
```
@Profpatsch Profpatsch force-pushed the Profpatsch:libstore-ssh-better-exec-error-message branch from e03869c to 38b29fb Dec 12, 2019
@Profpatsch
Copy link
Member Author

@Profpatsch Profpatsch commented Dec 12, 2019

Please inspect my C++ code carefully, I’m like a helpless child.

@edolstra edolstra merged commit 38b29fb into NixOS:master Dec 13, 2019
@edolstra
Copy link
Member

@edolstra edolstra commented Dec 13, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.