nixos-instantiate.sh produces invalid output
Friede80 opened this issue · 2 comments
Friede80 commented
Describe the bug
Running terraform plan
using the latest commit (e3cfe7c) give the following error:
Error: command ".terraform/modules/development.deploy_nixos/deploy_nixos/nixos-instantiate.sh" produced invalid JSON: invalid character 'r' looking for beginning of value
on .terraform/modules/development.deploy_nixos/deploy_nixos/main.tf line 123, in data "external" "nixos-instantiate":
123: data "external" "nixos-instantiate" {
The newly added check for the type of readlink
on the system gives the following output to stdout:
> readlink --version | grep GNU
readlink (GNU coreutils) 8.29
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
Terraform sees this output and tries to interpret is as the JSON output of the program and fails.
To Reproduce
Run terraform plan
on terraform project using the latest deploy_nixos
module, on a machine with GNU readlink
Expected behavior
terraform plan
to complete without error.
Environment
- OS name + version: 20.04.1 Ubuntu
- Version of the code: Terraform v0.12.20