Skip to content

Commit

Permalink
Merge pull request #938 from davidlatwe/raise-unversioned-error
Browse files Browse the repository at this point in the history
Raise unversioned error when config not allowed
  • Loading branch information
nerdvegas authored Aug 24, 2020
2 parents 2897a42 + 4026d47 commit 4a2c837
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rezplugins/package_repository/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,12 @@ def _remove_build_keys(obj):
# format version is always set
package_data["format_version"] = format_version

# Stop if package is unversioned and config does not allow that
if (not package_data["version"]
and not config.allow_unversioned_packages):
raise PackageMetadataError("Unversioned package is not allowed "
"in current configuration.")

# write out new package definition file
package_file = ".".join([package_filename, package_extension])
filepath = os.path.join(pkg_base_path, package_file)
Expand Down

0 comments on commit 4a2c837

Please sign in to comment.