Skip to content

Fix running wrapper on self-hosted runners - #526

Open
ribugent wants to merge 3 commits into
hashicorp:mainfrom
ribugent:fix-wrapper-node-self-hosted
Open

ribugent wants to merge 3 commits into
hashicorp:mainfrom
ribugent:fix-wrapper-node-self-hosted

Conversation

@ribugent

Copy link
Copy Markdown

Related Issue

Fixes #84

Description

On a self-hosted runner, the node binary isn't in the path, making the wrapper run fail.

In the related issue, there are several workarounds:

  • Adding the node binary to the path
  • Setting up the node before running Terraform

In my company, we have a shared workflow(using this action) that might run on GitHub-hosted runners or self-hosted runners, and I was hesitant to add a hack.

Looking for a solution I thought it would be nice to run the wrapper using the same node binary as this action does, so I decided to patch the first line of the wrapper to replace the #!/usr/bin/env node shebang with the full path of action node which can be found at process.argv[0].

I tested on my fork using a linux runners (GitHub and self-hosted), and it worked, but I'm unsure what will happen on Windows.

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

@ribugent
ribugent requested a review from a team as a code owner January 22, 2026 14:35
@hashicorp-cla-app

hashicorp-cla-app Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

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.

/usr/bin/env: 'node' no such file or directory when terraform_wrapper is set to true

1 participant