flatpak / flatpak-builder-tools

Various helper tools for flatpak-builder
191 stars 107 forks source link

cargo: Fix KeyError for workspaces that don't contain all sections #390

Closed felinira closed 7 months ago

felinira commented 8 months ago

I stumbled upon this when trying to build gtk-rs-core.

https://github.com/gtk-rs/gtk-rs-core/blob/master/Cargo.toml

The workspace itself doesn't have a dev-dependencies key, so it will throw a KeyError.

  File "flatpak-cargo-generator.py", line 139, in normalized
    package[section_key][key] = self.workspace[section_key][key]
                                ~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'dev-dependencies'
hfiguiere commented 7 months ago

Closed with #392