Open polamoros opened 6 months ago
It worked to me, same version (0.73.41
):
wing test -t tf-aws main.test.w
✔ Compiling main.test.w to tf-aws...
✔ terraform init
✔ terraform apply
✔ Setting up test runner...
✔ Running tests...
pass ─ main.test.tfaws.454176 » root/Test.OoU3q9EuIO/env0/test:Bucket is empty
✔ terraform destroy
✔ Snapshot main.test.w.tf-aws.snap.md...
Tests 1 passed (1)
Snapshots 1 new
Test Files 1 passed (1)
Duration 0m51.02s
it looks like it's happening if the root directory contains a space
Maybe we should file an issue anyway?
I'm able to repro this. Running wing test "dir with spaces/main.w"
is fine but wing test -t tf-aws "dir with spaces/main.w"
fails with the aforementioned error.
@srinumadhavv it is all yours :)
wing compile
fails for @thoroc, too, if there's spaces in the cwd.
Yes unfortunately MacOS has those spaces in certain situations where node tries to use a path on /Users/<USER>/Library/Application Support/
during compile time. In my case, this is due to be using github.com/Schniz/fnm. I have tried to have a peruse at the code for the compile
subcommand, but I think it is calling code outside this part of the source code.
Of course the path could be put between quotes or the space escaped to solve this issue, from what I understand.
Another user ran into this while compiling on Windows (the parent directory of their project had spaces, causing either compilation to fail or deployment to AWS to fail). Link to the discussion on discord: https://discord.com/channels/1096077994994442281/1258078911749820436
I tried this:
create an empty directory with a name that includes spaces
my directory
mkdir "my directory"
Create a wing test file:
and run
wing test -t tf-aws main.test.w
This happened:
I expected this:
The test to pass.
Is there a workaround?
no
Anything else?
The test passes on the simulator
Wing Version
0.73.41
Node.js Version
v20.11.1
Platform(s)
MacOS
Community Notes