File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,9 @@ def sync
223223    newparam ( :path )  do 
224224      desc  "The search path used for command execution. 
225225        Commands must be fully qualified if no path is specified.  Paths 
226-         can be specified as an array or as a '#{ File ::PATH_SEPARATOR }  ' separated list." 
226+         can be specified as an array or as a '#{ File ::PATH_SEPARATOR }  ' separated list. Defaults to the `path` fact." 
227+ 
228+       defaultto  Puppet . runtime [ :facter ] . value ( 'path' ) 
227229
228230      # Support both arrays and colon-separated fields. 
229231      def  value = ( *values ) 
Original file line number Diff line number Diff line change @@ -910,6 +910,8 @@ def instance(path)
910910    let  :abs   do  make_absolute ( '/bin/echo' )  end 
911911    let  :path  do  make_absolute ( '/bin' )  end 
912912
913+     allow ( Facter ) . to  receive ( :value ) . with ( 'path' ) . and_return ( '/usr/bin:/bin' ) 
914+ 
913915    it  "should fail with relative command and no path"  do 
914916      expect  {  type . new ( :command  =>  rel )  } . 
915917        to  raise_error  Puppet ::Error ,  /no path was specified/ 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments