You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To test if I'm running Bun, in my integration test I build a sample application, where during the build I use a simple Bun.version call to see if the build is actually executed by Bun.
module.exports=()=>({postcssPlugin: 'bun-check',Once(root){root.append({text: `/* Built with Bun ${Bun.version} */`})}})module.exports.postcss=true
It fails on GHA Windows with
$ postcss ./app/assets/stylesheets/application.postcss.css -o ./app/assets/builds/application.css
ReferenceError: Bun is not defined
Currently, my setup works on Linux, macOS, my local copy of Windows 11, but it fails on GitHub Actions running Windows (I've tried 2022 and 2025 Server).
What works: bun x --bun
What fails on GHA Windows, but works elsewhere: bun run --bun
What is the expected behavior?
Expected: the --bun flag runs the Bun runtime without falling back to Node even if it is available.
What do you see instead?
Instead, it tries to launch Node and dies on my check (Bun is not defined).
Additional information
No response
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.2.1
What platform is your computer?
Windows Server 2022, Windows Server 2025, GitHub Actions
What steps can reproduce the bug?
I am building something where I rely on integration tests to see if the environment uses a version of Bun and not Node.
Related: #11869
To test if I'm running Bun, in my integration test I build a sample application, where during the build I use a simple
Bun.version
call to see if the build is actually executed by Bun.The setup is simple:
package.json
and then
To test things, I have a simple PostCSS plugin
It fails on GHA Windows with
Currently, my setup works on Linux, macOS, my local copy of Windows 11, but it fails on GitHub Actions running Windows (I've tried 2022 and 2025 Server).
What works:
bun x --bun
What fails on GHA Windows, but works elsewhere:
bun run --bun
What is the expected behavior?
Expected: the
--bun
flag runs the Bun runtime without falling back to Node even if it is available.What do you see instead?
Instead, it tries to launch Node and dies on my check (
Bun is not defined
).Additional information
No response
The text was updated successfully, but these errors were encountered: