Chef inspec inheritance not working locally

Hi ,
I have inspec version : 4.24.32 installed on my local ubuntu machine.
I am trying to see the inheritance feature of inspec but it is erroring out.
What i did:
in one directory ../src i have kept two profile where one profile is inheriting the second one.
inspec.yml of profile which is inheriting the other profile, i have mentioned the to be inherited profile in depends section as:
depends
-name : name of profile( same as the profile name)
url: absolute path till src( parent directory )
it errors out with Could not fetch inspec profile in {:cwd=>"inspecinhritexample", :backend=>Inspec::Backend::Class @transport=TrainPlugins::Aws::Connection,

when i specify the path: instead of url it errors out as:
Could not fetch inspec profile in {:cwd=>"inspecinhritexample", :backend=>Inspec::Backend::Class @transport=TrainPlugins::Aws::Connection, :name=>"iam_get", :url=>"/home/hp/Desktop/POC/inspec/aws/IAM/src/"}.

Can you please help :slight_smile:

Hello,
I am sorry you are experiencing difficulty!
When using local directories, you should always use the path option.

With two profiles located:

profile_parent/
  \- inspec.yml
profile_child/

profile_parent's inspec.yml should include:

depends:
  - name: profile_child
    path: ../profile_child

Note that the path to the dependent profile is relative to the including profile, not to the current directory of the invocation. You may also use an absolute path, if that is less confusing.

Best of luck!