Skip to content

Commit

Permalink
throw error when distribution or release is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
wormsik committed Oct 14, 2024
1 parent 4648201 commit bfefe40
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/python/dxpy/scripts/dx_build_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,11 @@ def _verify_app_source_dir_impl(src_dir, temp_dir, mode, enforce=True):
if "interpreter" not in manifest['runSpec']:
raise dxpy.app_builder.AppBuilderException('runSpec.interpreter field was not present')

if "release" not in manifest['runSpec'] or "distribution" not in manifest['runSpec']:
warn_message = 'runSpec.distribution or runSpec.release was not present. These fields '
warn_message += 'will be required in a future version of the API. Recommended value '
warn_message += 'for distribution is \"Ubuntu\" and release - \"14.04\".'
logger.warn(warn_message)
if "distribution" not in manifest['runSpec']:
raise dxpy.app_builder.AppBuilderException('Required field runSpec.distribution is not present')

if "release" not in manifest['runSpec']:
raise dxpy.app_builder.AppBuilderException('Required field runSpec.release is not present')

if manifest['runSpec']['interpreter'] in ["python2.7", "bash", "python3"]:
if "file" in manifest['runSpec']:
Expand Down

0 comments on commit bfefe40

Please sign in to comment.