Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nora Puchreiner
Nix
Commits
d1b238ec
Commit
d1b238ec
authored
5 years ago
by
Eelco Dolstra
Browse files
Options
Downloads
Patches
Plain Diff
Simplify
parent
2da4c610
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/libstore/ssh.cc
+2
-5
2 additions, 5 deletions
src/libstore/ssh.cc
with
2 additions
and
5 deletions
src/libstore/ssh.cc
+
2
−
5
View file @
d1b238ec
...
...
@@ -47,13 +47,10 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string
throw
SysError
(
"duping over stderr"
);
Strings
args
;
const
char
*
execInto
;
if
(
fakeSSH
)
{
execInto
=
"bash"
;
args
=
{
"bash"
,
"-c"
};
}
else
{
execInto
=
"ssh"
;
args
=
{
"ssh"
,
host
.
c_str
(),
"-x"
,
"-a"
};
addCommonSSHOpts
(
args
);
if
(
socketPath
!=
""
)
...
...
@@ -66,7 +63,7 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string
execvp
(
args
.
begin
()
->
c_str
(),
stringsToCharPtrs
(
args
).
data
());
// could not exec ssh/bash
throw
SysError
(
"
Fai
le
d
to exec
into %s. Is it in PATH?"
,
execInto
);
throw
SysError
(
"
unab
le to exec
ute '%s'"
,
args
.
front
()
);
});
...
...
@@ -112,7 +109,7 @@ Path SSHMaster::startMaster()
addCommonSSHOpts
(
args
);
execvp
(
args
.
begin
()
->
c_str
(),
stringsToCharPtrs
(
args
).
data
());
throw
SysError
(
"
Fai
le
d
to exec
into ssh. Is it in PATH?"
);
throw
SysError
(
"
unab
le to exec
ute '%s'"
,
args
.
front
()
);
});
out
.
writeSide
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment