fresh-cat-90827
08/17/2022, 1:54 PMpants.toml
-pants_version = "2.12.0"
+pants_version = "%(env.MY_FAVOURITE_PANTS_VERSION)s"
$ MY_FAVOURITE_PANTS_VERSION="2.12.0" ./pants version
./pants: line 132: [[: %(env: syntax error: operand expected (error token is "%(env")
....
bitter-ability-32190
08/17/2022, 1:56 PMpants_version
line is special. The ./pants
script parses it out:
https://github.com/pantsbuild/setup/blob/eb887ad5fd80766214e8c38102a5bc92d1342beb/pants#L132fresh-cat-90827
08/17/2022, 1:57 PMbitter-ability-32190
08/17/2022, 1:57 PMbazelisk
for Bazelfresh-cat-90827
08/17/2022, 1:59 PMpants_version
from the [GLOBAL]
altogether:
./pants version --pants-version="2.12.0"
Please explicitly specify the `pants_version` in your `pants.toml` under the `[GLOBAL]` scope.
See <https://pypi.org/project/pantsbuild.pants/#history> for all released versions
and <https://www.pantsbuild.org/docs/installation> for more instructions.
$ PANTS_VERSION="2.12.0" ./pants version
Bootstrapping Pants using /home/homeuser/.pyenv/versions/3.9.13/envs/cheeseshop/bin/python3.9
Installing pantsbuild.pants==9.99.9 into a virtual environment at /home/homeuser/.cache/pants/setup/bootstrap-Linux-x86_64/9.99.9 _py39