sstadick / cargo-bundle-licenses

Generate a THIRDPARTY file with all licenses in a cargo project.
Apache License 2.0
90 stars 6 forks source link

Avoid OS specific path-formatting #36

Open igiona opened 5 months ago

igiona commented 5 months ago

I recently stumbled across my pipeline failing due to a mismatch in the THIRDPARTY.yml file I could explain.

It turned out that my local machine (windows) and the pipeline (linux) generate a different license format for the ring crate:

-  license: License specified in file ($CARGO_HOME\registry\src\index.crates.io-6f17d22bba15001f\ring-0.17.8\LICENSE)
+  license: License specified in file ($CARGO_HOME/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/LICENSE)

In my opinion, it would be better if this tool would generate OS-agnostic paths in the yaml file (e.g. by always using the unix path-format), or at least to give an option on how to override the OS-sepcific path formatting with something like --path-format unix/win.