diff --git a/install.sh b/install.sh index 1b47fcb..f07d9bc 100755 --- a/install.sh +++ b/install.sh @@ -96,11 +96,12 @@ chmod +x "$PAM_WSL_HELLO_WINPATH/WindowsHelloBridge.exe" set +x echo_stage "Installing PAM module to the Linux system..." -SECURITY_PATH="/lib/x86_64-linux-gnu/security" +ARCH="$(uname -m)" +SECURITY_PATH="/lib/$ARCH-linux-gnu/security" if ! check_pam_directory "${SECURITY_PATH}"; then - echo "PAM directory was not found in '/lib/x86_64-linux-gnu/security/'. It looks like you're not running Ubuntu nor Debian." + echo "PAM directory was not found in '$SECURITY_PATH'. It looks like you're not running Ubuntu nor Debian." echo "Checking '/lib/security/'..." - SECURITY_PATH="/lib/security" + SECURITY_PATH="/lib/security" while ! check_pam_directory "${SECURITY_PATH}"; do echo "PAM module directory was not found in '${SECURITY_PATH}'." echo "Please input the path of the PAM module's directory." diff --git a/win_hello_bridge/src/main.rs b/win_hello_bridge/src/main.rs index a6e4651..781d0bf 100644 --- a/win_hello_bridge/src/main.rs +++ b/win_hello_bridge/src/main.rs @@ -75,7 +75,11 @@ fn main() { }; if let Err(e) = result() { - println!("Error: {}", e); + if let FailureReason::Other(e) = e { + println!("Error: {}", e.message()); + } else { + println!("Error: {}", e); + } if prompt_to_exit { println!("Hit Enter key to terminate...");