eabglobal / juniper

Juniper is a cli based tool used to package lambda functions
Apache License 2.0
67 stars 9 forks source link

Fix packaging for includes of ./ #30

Closed pdiazvargas closed 5 years ago

pdiazvargas commented 5 years ago

Actual

Whe building juniper with the following manifest:

functions:
  sample:
    requirements: ./requirements.txt
    include:
      - ./

I get this error message:

  File "/Users/pdiazvargas/source/eab/juniper/juniper/actions.py", line 85, in <listcomp>
    for name, sls_function in manifest.get('functions', {}).items()
  File "/Users/pdiazvargas/source/eab/juniper/juniper/actions.py", line 113, in _get_volumes
    for include in sls_function.get('include', [])
  File "/Users/pdiazvargas/source/eab/juniper/juniper/actions.py", line 113, in <listcomp>
    for include in sls_function.get('include', [])
  File "/Users/pdiazvargas/source/eab/juniper/juniper/actions.py", line 104, in get_vol
    name = norm_include[norm_include.rindex('/') + 1:]
ValueError: substring not found

Expected

I should be able to package a lambda function with the includes pointing to my current path.