infracost / vscode-infracost

See cost estimates for Terraform right in your editor💰📉

Home Page:https://www.infracost.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extension throws error when workspace paths contain an error

hugorut opened this issue · comments

When a workspace folder contains a space, e.g:

folder/
   my folder/ # note space
       prod/
       dev/

Infracost fails as the path passed to the CLI is not properly escaped, so the above example would fail with:

debug: running Infracost cmd INFRACOST_CLI_PLATFORM=vscode infracost breakdown --path /Users/someuser/folder/my folder --format json --log-level info
error: Infracost cmd error trace Error: Command failed: INFRACOST_CLI_PLATFORM=vscode infracost breakdown --path /Users/someuser/folder/my folder --format json --log-level info
�[91mError:�[0m No such file or directory /Users/someuser/folder/my

Try setting --path to a Terraform plan JSON file. See �[4;1mhttps://infracost.io/troubleshoot�[0m for how to generate this.

�[33mUpdate:�[0m A new version of Infracost is available: �[96mv0.10.6�[0m → �[96mv0.10.7�[0m
  $ curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh

This has been fixed in the 0.1.15 version of the extension