Skip to content

Commit

Permalink
fix: pass NPM_CONFIG_REGISTRY env variable when bundling functions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
laktek authored Jan 7, 2025
2 parents 96de763 + 8e17f03 commit 94cf287
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/functions/deploy/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ func (b *dockerBundler) Bundle(ctx context.Context, entrypoint string, importMap
if viper.GetBool("DEBUG") {
cmd = append(cmd, "--verbose")
}
env := []string{}
if custom_registry := os.Getenv("NPM_CONFIG_REGISTRY"); custom_registry != "" {
env = append(env, "NPM_CONFIG_REGISTRY="+custom_registry)
}
// Run bundle
if err := utils.DockerRunOnceWithConfig(
ctx,
container.Config{
Image: utils.Config.EdgeRuntime.Image,
Env: []string{},
Env: env,
Cmd: cmd,
WorkingDir: utils.ToDockerPath(cwd),
},
Expand Down

0 comments on commit 94cf287

Please sign in to comment.