winglang/wing

Cloud deployment fails if root directory contains spaces

Open

#6,465 建立於 2024年5月13日

在 GitHub 查看
 (8 留言) (2 反應) (0 負責人)TypeScript (214 fork)github user discovery
good first issue☁️ aws🐛 bug

倉庫指標

Star
 (5,385 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I tried this:

create an empty directory with a name that includes spaces my directory

mkdir "my directory"

Create a wing test file:

//my directory/main.test.w

bring cloud;

let bucket = new cloud.Bucket();

test "Bucket is empty" {
  assert(bucket.list().length == 0);
}

and run wing test -t tf-aws main.test.w

This happened:

✔ Compiling main.test.w to tf-aws...

✔ terraform init

✖ terraform apply

Command failed: terraform apply -auto-approve
╷
│ Error: opening S3 object source (assets/Test78LWzuS1GQ_env0_testBucketisempty_Handler_Asset_9A744A14/966A2F55D4BD8FD662E1A92D8BB84CD9/archive.zip): open assets/Test78LWzuS1GQ_env0_testBucketisempty_Handler_Asset_9A744A14/966A2F55D4BD8FD662E1A92D8BB84CD9/archive.zip: no such file or directory
│
│   with aws_s3_object.Test78LWzuS1GQ_env0_testBucketisempty_Handler_S3Object_9FB2AC36,
│   on main.tf.json line 145, in resource.aws_s3_object.Test78LWzuS1GQ_env0_testBucketisempty_Handler_S3Object_9FB2AC36:
│  145:       }
│
╵

✔ terraform destroy


Tests 1 failed (1)
Snapshots 1 skipped
Test Files 1 failed (1)
Duration 0m23.74s

I expected this:

The test to pass.

Is there a workaround?

no

Anything else?

The test passes on the simulator

>_ wing test main.test.w

pass ─ main.test.wsim » root/env0/test:Bucket is empty

Tests 1 passed (1)
Snapshots 1 skipped
Test Files 1 passed (1)
Duration 0m0.30s

Wing Version

0.73.41

Node.js Version

v20.11.1

Platform(s)

MacOS

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.

貢獻者指南