crypt: make it possible to compile and test on macOS
Our current crypt implmentation requires glibc to be available on the developer's system. But it is not strictly necessary, because I'd like to run at least unit tests on mac. This PR makes it possible to compile and run unit-tests on mac, but it will panic if someone tries to run osbuild-composer on mac.
This commit is contained in:
parent
7bdd51cd23
commit
aab8a4d305
2 changed files with 10 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// +build !macos
|
||||
|
||||
// Copied from https://github.com/amoghe/go-crypt/blob/b3e291286513a0c993f7c4dd7060d327d2d56143/crypt_r.go
|
||||
// Original sources are under MIT license:
|
||||
// The MIT License (MIT)
|
||||
|
|
|
|||
8
internal/crypt/crypt_impl_macos.go
Normal file
8
internal/crypt/crypt_impl_macos.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// +build macos
|
||||
|
||||
package crypt
|
||||
|
||||
func crypt(pass, salt string) (string, error) {
|
||||
panic("You must not run osbuild-composer on macOS!")
|
||||
return "", nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue