static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

swa deploy fails in Bazel

Open vsesh opened this issue 6 months ago • 2 comments

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(),
)
  1. Call bazel run release

Screenshots With Bazel: image

Without: image

Desktop (please complete the following information):

  • OS: MacOS
  • Version 14.5

vsesh avatar Aug 05 '24 14:08 vsesh