Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
fix: typo
  • Loading branch information
greenhat616 committed Sep 3, 2024
1 parent 38b6c5e commit eefb18b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/tauri/src/core/service/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ pub async fn status<'a>() -> anyhow::Result<nyanpasu_ipc::types::StatusInfo<'a>>
let mut cmd = tokio::process::Command::new(SERVICE_PATH.as_path());
cmd.args(["status", "--json"]);
#[cfg(windows)]
cmd.creation_flags(0x8000000); // CREATE_NO_WINDOW
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
let output = cmd.output().await?;
if !output.status.success() {
anyhow::bail!(
"failed to install service, exit code: {}, signal: {:?}",
"failed to query service status, exit code: {}, signal: {:?}",
output.status.code().unwrap_or(-1),
{
#[cfg(unix)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useMemoizedFn } from "ahooks";
import { ChangeEvent, useTransition } from "react";
import { useTranslation } from "react-i18next";
import { formatError } from "@/utils";
import { message } from "@/utils/notification";
import { LoadingButton } from "@mui/lab";
import { List, ListItem, ListItemText, Typography } from "@mui/material";
Expand Down Expand Up @@ -102,7 +103,9 @@ export const SettingSystemService = () => {
await restartSidecar();
} catch (e) {
const errorMessage =
getServiceStatus.data === "running" ? "Stop failed" : "Start failed";
getServiceStatus.data === "running"
? `Stop failed: ${formatError(e)}`
: `Start failed: ${formatError(e)}`;

message(errorMessage, {
type: "error",
Expand Down

0 comments on commit eefb18b

Please sign in to comment.