Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

feat(install): if SKIP_REPLACE_I18N is set, skip replace i18n bundles

LinkinStars0974c6063a0e
diff --git a/internal/cli/install.go b/internal/cli/install.go
index 4ac75924..128f28c9 100644
--- a/internal/cli/install.go
+++ b/internal/cli/install.go
@@ -100,6 +100,10 @@ func installUploadDir() {
func InstallI18nBundle(replace bool) {
fmt.Println("[i18n] try to install i18n bundle...")
+ // if SKIP_REPLACE_I18N is set, skip replace i18n bundles
+ if len(os.Getenv("SKIP_REPLACE_I18N")) > 0 {
+ replace = false
+ }
if err := dir.CreateDirIfNotExist(I18nPath); err != nil {
fmt.Println(err.Error())
return