Closed tardyp closed 3 years ago
Something that's a head scratcher to me is: where is the magic DB obtained from when not provided by a plugin?
as per doc:
The magic_load() function must be used to load the colon separated
list of database files passed in as filename, or NULL for the
default database file before any magic queries can performed.
The default database file is named by the MAGIC environment
variable. If that variable is not set, the default database file
name is /usr/local/share/misc/magic. magic_load() adds “.mgc” to
the database filename as appropriate.
I added the version api which might help in case of a later bug report
@pombredanne shall we merge this? I think you may need to re run flaky azure pipelines.
Merged in #20
This allows scancode to work on platforms not supported by typecode-libmagic e.g. M1 Macs or windows WSL
100% tests pass with this change on my M1 Mac