mach-composer-cli icon indicating copy to clipboard operation
mach-composer-cli copied to clipboard

Windows local source module bootstrapping

Open boro2g opened this issue 3 years ago • 2 comments

When running on windows, if you have the config:

components:
- name: ct-tf
  source: ../ct-tf
  version: 0.1.0
  integrations:  
  - commercetools

and run mach apply, this generates the site.tf with

module "ct-tf" {
  source            = "C:\xxx\xxx\MachComposer\ct-tf"

which raises the exception:

Generated file deployments\main\mach-composer-test\site.tf
╷
│ Error: Invalid escape sequence
│
│   on site.tf line 99, in module "ct-tf":
│   99:   source            = "C:\xxx\xxx\MachComposer\ct-tf"
│
│ The symbol "x" is not a valid escape sequence selector.

If I manually edit site.tf and adjust the source path to be e.g.

source            = "C:\\xxx\\xxx\\MachComposer\\ct-tf"

Then it can be installed ok using normal terraform apply.

boro2g avatar Dec 07 '21 13:12 boro2g

Hi @boro2g what happens if you replace the backslashes with forward slashes?

Update Could you try the version in the feature/windows-support branch?

tleguijt avatar Dec 08 '21 20:12 tleguijt

Sure, do you have instructions for how to run it off a different branch?

boro2g avatar Dec 09 '21 10:12 boro2g

Will be fixed in the new version (2.4.0), to be released asap

mvantellingen avatar Nov 25 '22 12:11 mvantellingen