Path location relative path

Hello!

I’d like to create a path relative to the config’s location in app_locations.yml
Something like this:

apps.tk-multi-publish2.location:
  type: dev
  name: tk-multi-publish2
  path: {config_location(??)}\plugins\tk-multi-publish2

Is there a way to achieve this?

If I remember correctly you need to use “{CONFIG_FOLDER}” instead {config_location(??)}

2 Likes

Yes, I have found this too, but it gives me errors when I use it.

This config:

apps.tk-multi-publish2.location:
  type: dev
  name: tk-multi-publish2
  path: {CONFIG_FOLDER}\plugins\tk-multi-publish2

Results in:

...AppData\Roaming\Shotgun\folder\p782c167.basic.desktop\cfg\install\core\python\tank_vendor\yaml\python3\parser.py", line 439, in parse_block_mapping_key
    "expected , but found %r" % token.id, token.start_mark)
tank_vendor.yaml.python3.parser.ParserError: while parsing a block mapping
  in "...\Shotgrid\test-git-config\env\includes\app_locations.yml", line 52, column 3
expected , but found ''
  in "...\Shotgrid\test-git-config\env\includes\app_locations.yml", line 54, column 24

Put quotes around it:

apps.tk-multi-publish2.location:
  type: dev
  name: tk-multi-publish2
  path: "{CONFIG_FOLDER}\plugins\tk-multi-publish2"
2 Likes