From 816a2cbe019e2d8759a84ab76f696c09bc9fd39e Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 26 Oct 2020 17:54:41 +0100 Subject: [PATCH] [yabridgectl] Update Wine error detection The usage string has changed, better to just match part of it so this won't cause issues again in the future. --- tools/yabridgectl/src/utils.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/yabridgectl/src/utils.rs b/tools/yabridgectl/src/utils.rs index 026dc59d..cbc025c5 100644 --- a/tools/yabridgectl/src/utils.rs +++ b/tools/yabridgectl/src/utils.rs @@ -31,9 +31,9 @@ use textwrap::Wrapper; use crate::config::{Config, KnownConfig}; /// (Part of) the expected output when running `yabridge-host.exe`. Used to verify that everything's -/// working correctly. -const YABRIDGE_HOST_EXPECTED_OUTPUT: &str = - "Usage: yabridge-host.exe "; +/// working correctly. We'll only match this prefix so we can modify the exact output at a later +/// moment without causing issues. +const YABRIDGE_HOST_EXPECTED_OUTPUT_PREFIX: &str = "Usage: yabridge-"; /// Wrapper around [`std::fs::copy()`](std::fs::copy) with a human readable error message. pub fn copy, Q: AsRef>(from: P, to: Q) -> Result { @@ -220,7 +220,7 @@ pub fn verify_wine_setup(config: &mut Config) -> Result<()> { let mut success = false; let mut last_error: Option<&str> = None; for line in stderr.lines() { - if line == YABRIDGE_HOST_EXPECTED_OUTPUT { + if line.starts_with(YABRIDGE_HOST_EXPECTED_OUTPUT_PREFIX) { success = true; break; }