Skip to content

Commit ee8ff2e

Browse files
author
cw
committed
fix: resolve Build and Deploy CI failures
- Apply cargo fmt formatting to cli/src/ (import ordering, trailing commas, line wrapping) - Fix telemetry-api Dockerfile: npm ci -> npm install (no package-lock.json in repo)
1 parent dc36409 commit ee8ff2e

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

cli/src/error.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ pub enum OpenCliError {
2929
impl OpenCliError {
3030
pub fn suggest_fix(&self) -> Option<String> {
3131
match self {
32-
OpenCliError::DaemonNotRunning => {
33-
Some("Try running: opencli daemon start".to_string())
34-
}
32+
OpenCliError::DaemonNotRunning => Some("Try running: opencli daemon start".to_string()),
3533
OpenCliError::IpcConnectionFailed(_) => {
3634
Some("Check if daemon is running: opencli daemon status".to_string())
3735
}

cli/src/ipc.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use std::path::PathBuf;
2-
use std::io::{Read, Write};
3-
use serde::{Deserialize, Serialize};
41
use crate::error::{OpenCliError, Result};
2+
use serde::{Deserialize, Serialize};
3+
use std::io::{Read, Write};
4+
use std::path::PathBuf;
55

66
#[cfg(unix)]
77
use std::os::unix::net::UnixStream;
@@ -36,8 +36,8 @@ impl IpcClient {
3636
pub fn connect() -> Result<Self> {
3737
#[cfg(unix)]
3838
{
39-
let stream = UnixStream::connect(SOCKET_PATH)
40-
.map_err(|_| OpenCliError::DaemonNotRunning)?;
39+
let stream =
40+
UnixStream::connect(SOCKET_PATH).map_err(|_| OpenCliError::DaemonNotRunning)?;
4141

4242
Ok(Self { stream })
4343
}
@@ -83,7 +83,9 @@ impl IpcClient {
8383

8484
if !response.success {
8585
return Err(OpenCliError::RequestFailed(
86-
response.error.unwrap_or_else(|| "Unknown error".to_string())
86+
response
87+
.error
88+
.unwrap_or_else(|| "Unknown error".to_string()),
8789
));
8890
}
8991

@@ -94,7 +96,7 @@ impl IpcClient {
9496
{
9597
// Windows named pipe implementation coming soon
9698
Err(OpenCliError::RequestFailed(
97-
"Windows IPC support is not yet implemented".to_string()
99+
"Windows IPC support is not yet implemented".to_string(),
98100
))
99101
}
100102
}

cli/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
mod args;
2-
mod ipc;
32
mod error;
3+
mod ipc;
44
mod resource;
55

6-
use clap::Parser;
76
use args::Cli;
7+
use clap::Parser;
88
use error::Result;
99

1010
fn main() {

cli/src/resource.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use std::path::PathBuf;
2-
use std::fs;
31
use crate::error::{OpenCliError, Result};
2+
use std::fs;
3+
use std::path::PathBuf;
44

55
const DAEMON_BINARY: &[u8] = &[]; // Will be embedded at build time
66

cloud/telemetry-api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKDIR /app
66
COPY package*.json ./
77

88
# Install dependencies
9-
RUN npm ci --only=production
9+
RUN npm install --omit=dev
1010

1111
# Copy source code
1212
COPY src/ ./src/

0 commit comments

Comments
 (0)