mirror of
https://github.com/charmbracelet/crush.git
synced 2026-05-30 18:47:33 +00:00
Or we risk making them failing on other platforms due to incompatibilities. Fixes #1341
20 lines
362 B
Go
20 lines
362 B
Go
package shell
|
|
|
|
import (
|
|
"os"
|
|
"runtime"
|
|
"strconv"
|
|
)
|
|
|
|
var useGoCoreUtils bool
|
|
|
|
func init() {
|
|
// If CRUSH_CORE_UTILS is set to either true or false, respect that.
|
|
// By default, enable on Windows only.
|
|
if v, err := strconv.ParseBool(os.Getenv("CRUSH_CORE_UTILS")); err == nil {
|
|
useGoCoreUtils = v
|
|
} else {
|
|
useGoCoreUtils = runtime.GOOS == "windows"
|
|
}
|
|
}
|