Azure / Azure/static-web-apps-cli

swa deploy fails in Bazel

Open
#877 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
668
Forks
156
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I am trying to move the `swa deploy` command to Bazel. But I consistently get an unknown error.

Everything works without Bazel.

I suppose it could be related to the strict path to binary folders. But I am not fully sure about it.

It looks like the issue happens during creating a child process.

**To Reproduce**
1. Setup calling `swa cli` as binary in Bazel config. Like this:
```
swa_bin.swa_binary(
name = "release",
args = ["deploy"],
data = ["/.out"],
env = {
"SWA_CLI_OUTPUT_LOCATION": "./out",
"SWA_CLI_DEPLOY_ENV": "production",
},
chdir = native.package_name(),
)
```
2. Call `bazel run release`

**Screenshots**
With Bazel:
image

Without:
image

**Desktop (please complete the following information):**

- OS: MacOS
- Version 14.5

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.