Skip to content

Commit

Permalink
sshfs: Log warning if sshfs is not found in the instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Townsend committed Mar 1, 2019
1 parent 7020a75 commit 9806c08
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sshfs_mount/sshfs_mount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ void check_sshfs_is_running(mp::SSHSession& session, mp::SSHProcess& sshfs_proce

void check_sshfs_exists(mp::SSHSession& session)
{
auto error_handler = [](mp::SSHProcess&) { throw mp::SSHFSMissingError(); };
auto error_handler = [](mp::SSHProcess& proc) {
mpl::log(mpl::Level::warning, category,
fmt::format("Unable to determine if 'sshfs' is installed: {}", proc.read_std_error()));
throw mp::SSHFSMissingError();
};

run_cmd(session, "which sshfs", error_handler);
}

Expand Down

0 comments on commit 9806c08

Please sign in to comment.