mirror of
https://github.com/status-im/status-react.git
synced 2025-01-09 10:42:53 +00:00
4eff9cc39c
`getEnvWithDefault.nix` prints a trace message in console when a default value is not set. In this commit we add a check to see if default value matches the value of that env var. Otherwise we get log messages like these when running `make run-ios` ``` trace: getEnvWithDefault IOS_STATUS_GO_TARGETS (default: ios/arm64;iossimulator/amd64): ios/arm64;iossimulator/amd64 trace: getEnvWithDefault IOS_STATUS_GO_TARGETS (default: ios/arm64;iossimulator/amd64): ios/arm64;iossimulator/amd64 ``` We also fix a tiny mistake in `make run-ios` status-go target by updating the delimiter to be a semi-colon instead of a comma.
9 lines
279 B
Nix
9 lines
279 B
Nix
name: default: let
|
|
envOverride = builtins.getEnv name;
|
|
logEnvOverride = value:
|
|
builtins.trace "getEnvWithDefault ${name} (default: ${toString default}): ${value}" value;
|
|
in
|
|
if envOverride != "" && envOverride != default
|
|
then logEnvOverride envOverride
|
|
else default
|