We work on mac and linux machines, when working on...
# general
s
We work on mac and linux machines, when working on mac some of my coworkers need "sw_vers" to be in
[docker].tools
but "sw_vers" doesn't work on Linux. Is there a way to make this configurable depending on the OS?
1
c
you can put platform specific settings in a separate file, which you can then include either using rc files per https://www.pantsbuild.org/docs/reference-global#pantsrc_files or more manually with something along the lines of:
Copy code
# .pants.bootstrap
case `uname -s`;
  Darwin) PLAT_CFG="pants.macos.toml" ;;
  Linux) PLAT_CFG="pants.linux.toml" ;;
esac

export PANTS_CONFIG_FILES="['pants.toml', '$PLAT_CFG']"
s
Thanks! That's exactly what I was looking for
👍 1