Skip to content

Commit

Permalink
fix(ci): Disable pyright postinstall scripts
Browse files Browse the repository at this point in the history
Pyright postinstall scripts are as follow (stripped)

```json
    "scripts": {
        "postinstall": "node ./build/skipBootstrap.js || npm run install:others",
        "install:others": "cross-env SKIP_LERNA_BOOTSTRAP=yes lerna exec --no-bail npm install",
    }
```

When running `pybun install` on the pyright repository, bun execute the postinstall
script and replace `npm run install:others` with `bun install:others`.

But since we use pybun, we don't have a "bun" CLI available so the `bun install:others`
command fail.

My guess is that this postinstall step is not required to bundle pyright.
  • Loading branch information
ducdetronquito committed Oct 15, 2024
1 parent a833a28 commit 28b9e97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/build_pyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def install_pyright_dependencies(pyright_version: str):
logger.info(f"Install pyright {pyright_version} dependencies")

with chdir(f"./temp/pyright-{pyright_version}"):
return_code = subprocess.call([sys.executable, "-m", "pybun", "install"])
return_code = subprocess.call(
[sys.executable, "-m", "pybun", "install", "--ignore-scripts"]
)
if return_code != 0:
logger.error(f"Failed with code {return_code}")
return
Expand Down

0 comments on commit 28b9e97

Please sign in to comment.