Skip to content

Updates the AUTO_TFVARS_COUNTER to increment in decimal#416

Closed
cdsre wants to merge 1 commit intodflook:mainfrom
cdsre:issue-415
Closed

Updates the AUTO_TFVARS_COUNTER to increment in decimal#416
cdsre wants to merge 1 commit intodflook:mainfrom
cdsre:issue-415

Conversation

@cdsre
Copy link
Copy Markdown
Contributor

@cdsre cdsre commented Jan 12, 2026

As part of issue #415 when you have more than 8 vars files the action fails due to it evaluating numbers as octal. This can be reproduced in simple bash shell.

AUTO_TFVARS_COUNTER="00"

for i in {1..10}
> do
> AUTO_TFVARS_COUNTER=$(printf "%02d\n" "$((AUTO_TFVARS_COUNTER + 1))")
> echo $AUTO_TFVARS_COUNTER
> done
01
02
03
04
05
06
07
08
-bash: 08: value too great for base (error token is "08")

This fix will foce the number to decimal before incrementing it and will support any number of vars files. This again can be tested in bash

AUTO_TFVARS_COUNTER="00"

for i in {1..10}
> do
> AUTO_TFVARS_COUNTER=$(printf "%02d\n" "$((10#${AUTO_TFVARS_COUNTER} + 1))")
> echo $AUTO_TFVARS_COUNTER
> done
01
02
03
04
05
06
07
08
09
10

@dflook
Copy link
Copy Markdown
Owner

dflook commented Jan 13, 2026

Thanks @cdsre, this commit was included in #417 and released in v2.2.3

@chris-doyle-BR-DGE
Copy link
Copy Markdown

Awesome, I dont seem to be able to close this PR feel free to close it so the repo stays tidy.

@dflook dflook closed this Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants