mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	conf: handle array of arguments in context.exec
We handeled "arg1 arg2 ... " before and used to split between spaces to get the arguments for execvp but that doesn't work so well when there are arguments with spaces. Instead use JSON parsing to get the array of arguments. This make it possible to use [ arg1 arg2 .. ] and quote each arg separately. You can still use the old method and even double escape: "\"arg1\" \"arg2 with spaces\"" or [ "arg1" "arg2 with spaces" ]
This commit is contained in:
		
							parent
							
								
									4a19a76dc1
								
							
						
					
					
						commit
						7f4a0ba8cb
					
				
					 4 changed files with 51 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -426,7 +426,7 @@ context.objects = [
 | 
			
		|||
 | 
			
		||||
context.exec = [
 | 
			
		||||
    #{   path = <program-name>
 | 
			
		||||
    #    ( args = "<arguments>" )
 | 
			
		||||
    #    ( args = "<arguments>" | [ <arg1> <arg2> ... ] )
 | 
			
		||||
    #    ( condition = [ { <key> = <value> ... } ... ] )
 | 
			
		||||
    #}
 | 
			
		||||
    #
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -319,7 +319,7 @@ context.objects = [
 | 
			
		|||
 | 
			
		||||
context.exec = [
 | 
			
		||||
    #{   path = <program-name>
 | 
			
		||||
    #    ( args = "<arguments>" )
 | 
			
		||||
    #    ( args = "<arguments>" | [ <arg1> <arg2> ... ] )
 | 
			
		||||
    #    ( condition = [ { <key> = <value> ... } ... ] )
 | 
			
		||||
    #}
 | 
			
		||||
    #
 | 
			
		||||
| 
						 | 
				
			
			@ -339,6 +339,6 @@ context.exec = [
 | 
			
		|||
    # It can be interesting to start another daemon here that listens
 | 
			
		||||
    # on another address with the -a option (eg. -a tcp:4713).
 | 
			
		||||
    #
 | 
			
		||||
    @pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf"
 | 
			
		||||
    @pulse_comment@{ path = "@pipewire_path@" args = [ "-c" "pipewire-pulse.conf" ]
 | 
			
		||||
    @pulse_comment@  condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] }
 | 
			
		||||
]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue