File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " vopono"
3
3
description = " Launch applications via VPN tunnels using temporary network namespaces"
4
- version = " 0.6.0 "
4
+ version = " 0.6.1 "
5
5
authors = [
" James McMurray <[email protected] >" ]
6
6
edition = " 2018"
7
7
license = " GPL-3.0-or-later"
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ mod wireguard;
22
22
23
23
use list:: output_list;
24
24
use list_configs:: print_configs;
25
- use log:: { debug, LevelFilter } ;
25
+ use log:: { debug, warn , LevelFilter } ;
26
26
use netns:: NetworkNamespace ;
27
27
use structopt:: StructOpt ;
28
28
use sync:: { sync_menu, synch} ;
@@ -52,8 +52,15 @@ fn main() -> anyhow::Result<()> {
52
52
args:: Command :: Exec ( cmd) => {
53
53
clean_dead_locks ( ) ?;
54
54
if which ( "pactl" ) . is_ok ( ) {
55
- let pa = pulseaudio:: get_pulseaudio_server ( ) ?;
56
- std:: env:: set_var ( "PULSE_SERVER" , pa) ;
55
+ let pa = pulseaudio:: get_pulseaudio_server ( ) ;
56
+ if let Ok ( pa) = pa {
57
+ std:: env:: set_var ( "PULSE_SERVER" , pa) ;
58
+ } else {
59
+ warn ! (
60
+ "Could not parse PULSE_SERVER from pactl info output: {:?}" ,
61
+ pa
62
+ ) ;
63
+ }
57
64
} else {
58
65
debug ! ( "pactl not found, will not set PULSE_SERVER" ) ;
59
66
}
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ pub fn get_pulseaudio_server() -> anyhow::Result<String> {
10
10
11
11
let caps = re. captures ( output) ;
12
12
if caps. is_none ( ) {
13
- return Err ( anyhow ! ( "Could not parse pactl output!" ) ) ;
13
+ return Err ( anyhow ! ( "Could not parse pactl output!: \n {}" , output ) ) ;
14
14
}
15
15
let caps = caps. unwrap ( ) . get ( 1 ) ;
16
16
if caps. is_none ( ) {
17
- return Err ( anyhow ! ( "Could not parse pactl output!" ) ) ;
17
+ return Err ( anyhow ! ( "Could not parse pactl output!: \n {}" , output ) ) ;
18
18
}
19
19
20
20
let out = caps. unwrap ( ) . as_str ( ) . to_string ( ) ;
You can’t perform that action at this time.
0 commit comments