cli: show service status in tunnel log

Fixes #183714
This commit is contained in:
Connor Peet
2023-06-15 14:11:03 -07:00
parent 979ae3940a
commit 8a74ad8ff5
10 changed files with 80 additions and 29 deletions

View File

@@ -6,7 +6,7 @@ use crate::util::errors::{wrap, WrappedError};
use flate2::read::GzDecoder;
use std::fs;
use std::io::{Seek, SeekFrom};
use std::io::Seek;
use std::path::{Path, PathBuf};
use tar::Archive;
@@ -65,7 +65,7 @@ where
// reset since skip logic read the tar already:
tar_gz
.seek(SeekFrom::Start(0))
.rewind()
.map_err(|e| wrap(e, "error resetting seek position"))?;
let tar = GzDecoder::new(tar_gz);

View File

@@ -88,8 +88,7 @@ where
use std::io::Read;
use std::os::unix::ffi::OsStringExt;
if matches!(file.unix_mode(), Some(mode) if mode & (S_IFLNK as u32) == (S_IFLNK as u32))
{
if matches!(file.unix_mode(), Some(mode) if mode & S_IFLNK == S_IFLNK) {
let mut link_to = Vec::new();
file.read_to_end(&mut link_to).map_err(|e| {
wrap(