vercel / vercel/hyper

Cannot set environment variables in .hyper.js (Windows 10, git bash)

Open
#3,746 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

  • I am on the latest Hyper.app version

  • I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: Windows 10

  • Hyper.app version: 3.0.2 (stable)

  • The issue is reproducible in vanilla Hyper.app: Is Vanilla.

Issue

Setting environment variables (env) in my .hyper.js does not seem to work.

For example, I have this in my .hyper.js:

		env: { 
			FOO: 'bar'
		},

but if I try to echo $FOO in the shell (which in my case is git bash) I get nothing.

However if I try the exact same thing in the exact same Hyper version on my Linux laptop, it works fine.

(By the way, this is completely anecdotal, but I do wonder whether this issue might be related to the various issues about the clear command not working, such as https://github.com/zeit/hyper/issues/3641)

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the env configuration in .hyper.js and reproduce the issue using Hyper 3.0.2 on Windows 10 with Git Bash. Trace how the configured variables are passed to that shell; the fix is complete when FOO is available after launching a shell, while preserving the working Linux behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, javascript
Domain
cli, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.