Skip to content

Commit 8e17f03

Browse files
committed
fix: pass NPM_CONFIG_REGISTRY env variable when bundling functions
1 parent 96de763 commit 8e17f03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/functions/deploy/bundle.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,16 @@ func (b *dockerBundler) Bundle(ctx context.Context, entrypoint string, importMap
5757
if viper.GetBool("DEBUG") {
5858
cmd = append(cmd, "--verbose")
5959
}
60+
env := []string{}
61+
if custom_registry := os.Getenv("NPM_CONFIG_REGISTRY"); custom_registry != "" {
62+
env = append(env, "NPM_CONFIG_REGISTRY="+custom_registry)
63+
}
6064
// Run bundle
6165
if err := utils.DockerRunOnceWithConfig(
6266
ctx,
6367
container.Config{
6468
Image: utils.Config.EdgeRuntime.Image,
65-
Env: []string{},
69+
Env: env,
6670
Cmd: cmd,
6771
WorkingDir: utils.ToDockerPath(cwd),
6872
},

0 commit comments

Comments
 (0)