statisticsnorway / ssb-project-cli

Create a new project quickly and easily, following SSBs guidelines for quality and security
MIT License
2 stars 1 forks source link

Build fails, Invalid lock "content-hash" on cloned project #187

Closed aecorn closed 1 year ago

aecorn commented 1 year ago

Lock file is already created in repo, user clones down repo with lock file. User tries ssb-project build in folder. Errors out, logfile:

CompletedProcess(args=['poetry', 'install'], returncode=1, stdout=b'Creating virtualenv utd-nudb in /home/jovyan/utd_nudb/.venv\nInstalling dependencies from lock file\n', stderr=b'\nUnable to read the lock file (Invalid TOML file /home/jovyan/utd_nudb/poetry.lock: Key "content-hash" already exists.).\n')

Error can be resolved by running poetry lock --no-update before running ssb-project build again. Should this robustness be built into build?

mmwinther commented 1 year ago

This sounds like a problem with the specific lock file in this project, there shouldn't be repeated keys in a TOML file. ssb-project shouldn't handle problems like this, that's up to the user.