Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(intellij): binary resolution on windows #556

Merged

Conversation

victor-teles
Copy link
Contributor

Summary

fixes #552

The problem

On mac the node_modules/.bin/biome resolves to a node script

#!/usr/bin/env node
const { platform, arch, env, version, release } = process;

const PLATFORMS = {
...

On windows it's shell script

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  exec "$basedir/node"  "$basedir/../@biomejs/biome/bin/biome" "$@"
else 
  exec node  "$basedir/../@biomejs/biome/bin/biome" "$@"
fi

Solution

Point direct to @biomejs/biome/bin/biome node script path

Test Plan

Tested on a Windows VM

@victor-teles victor-teles requested a review from a team October 20, 2023 02:20
@ematipico ematipico merged commit 8c62904 into biomejs:main Oct 20, 2023
4 checks passed
@victor-teles victor-teles deleted the fix/intellij-binary-resolution-windows branch October 20, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Error in webstorm plugin during formating
2 participants