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

Put bunfig.toml in global directory #99

Open
brettwillis opened this issue Aug 19, 2024 · 1 comment
Open

Put bunfig.toml in global directory #99

brettwillis opened this issue Aug 19, 2024 · 1 comment

Comments

@brettwillis
Copy link

Currently the auth tokens etc are written to a bunfig.toml file in the working directory. If the project is a monorepo and we run a bun install in a subdirectory, this config is not picked up.

If we can place the config in $HOME/.bunfig.toml then it would be picked up regardless of where we run bun install.

However I tried manually moving mv bunfig.toml $HOME/.bunfig.toml but bun still does not pick up the config. Could it be that bun does not expand the $BUN_AUTH_TOKEN env variable placeholder when it is in the global/home directory?

@videate-josh
Copy link

I have run into a similar issue. I need to checkout multiple repos side by side and run bun install in both and some of the install happens from a private internal github repo.

I end up with this issue, due to the fact I have to copy the bunfig.toml to multiple locations or else I end up with 401's when I run bun install.

4 | '@videate' = { token = "$BUN_AUTH_TOKEN", url = "https://npm.pkg.github.com/"}
                                                                                  ^
error: Cannot redefine key
    at /opt/actions-runner/_work/sidebar/sidebar/selectifier/bunfig.toml:4:79
SyntaxError: An error occurred while parsing code

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

No branches or pull requests

2 participants