forked from Plemya-x/ALR
		
	fix: add db.Init() in bash completion
This commit is contained in:
		@@ -11,7 +11,7 @@
 | 
			
		||||
    <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
 | 
			
		||||
        <text x="33.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
 | 
			
		||||
        <text x="33.5" y="14">coverage</text>
 | 
			
		||||
        <text x="86" y="15" fill="#010101" fill-opacity=".3">19.6%</text>
 | 
			
		||||
        <text x="86" y="14">19.6%</text>
 | 
			
		||||
        <text x="86" y="15" fill="#010101" fill-opacity=".3">19.5%</text>
 | 
			
		||||
        <text x="86" y="14">19.5%</text>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B  | 
@@ -12,7 +12,7 @@
 | 
			
		||||
    <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
 | 
			
		||||
        <text x="37" y="15" fill="#010101" fill-opacity=".3">ru translate</text>
 | 
			
		||||
        <text x="37" y="14">ru translate</text>
 | 
			
		||||
        <text x="100" y="15" fill="#010101" fill-opacity=".3">100.00%</text>
 | 
			
		||||
        <text x="100" y="14">100.00%</text>
 | 
			
		||||
        <text x="100" y="15" fill="#010101" fill-opacity=".3">99.00%</text>
 | 
			
		||||
        <text x="100" y="14">99.00%</text>
 | 
			
		||||
    </g>
 | 
			
		||||
</svg>
 | 
			
		||||
 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 940 B  | 
							
								
								
									
										6
									
								
								build.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								build.go
									
									
									
									
									
								
							@@ -50,9 +50,9 @@ func BuildCmd() *cli.Command {
 | 
			
		||||
				Usage:   gotext.Get("Path to the build script"),
 | 
			
		||||
			},
 | 
			
		||||
			&cli.StringFlag{
 | 
			
		||||
				Name:    "script-package",
 | 
			
		||||
				Aliases: []string{"sp"},
 | 
			
		||||
				Usage:   gotext.Get("Specify package in script (for multi package script only)"),
 | 
			
		||||
				Name:    "subpackage",
 | 
			
		||||
				Aliases: []string{"sb"},
 | 
			
		||||
				Usage:   gotext.Get("Specify subpackage in script (for multi package script only)"),
 | 
			
		||||
			},
 | 
			
		||||
			&cli.StringFlag{
 | 
			
		||||
				Name:    "package",
 | 
			
		||||
 
 | 
			
		||||
@@ -119,6 +119,11 @@ func InstallCmd() *cli.Command {
 | 
			
		||||
		BashComplete: func(c *cli.Context) {
 | 
			
		||||
			cfg := config.New()
 | 
			
		||||
			db := database.New(cfg)
 | 
			
		||||
			err := db.Init(c.Context)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				slog.Error(gotext.Get("Error initialization database"), "err", err)
 | 
			
		||||
				os.Exit(1)
 | 
			
		||||
			}
 | 
			
		||||
			result, err := db.GetPkgs(c.Context, "true")
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				slog.Error(gotext.Get("Error getting packages"), "err", err)
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,7 @@ func TestDownloadWithoutCache(t *testing.T) {
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			name: "git download",
 | 
			
		||||
			path: "git+%s/git-downloader/git/Plemya-x/xpamych-alr-repo",
 | 
			
		||||
			path: "git+%s/git-downloader/git/Plemya-x/alr-repo",
 | 
			
		||||
			expected: func(t *testing.T, err error, tmpdir string) {
 | 
			
		||||
				assert.NoError(t, err)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@ msgid "Path to the build script"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: build.go:55
 | 
			
		||||
msgid "Specify package in script (for multi package script only)"
 | 
			
		||||
msgid "Specify subpackage in script (for multi package script only)"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: build.go:60
 | 
			
		||||
@@ -158,15 +158,15 @@ msgstr ""
 | 
			
		||||
msgid "Command install expected at least 1 argument, got %d"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: install.go:146
 | 
			
		||||
#: install.go:151
 | 
			
		||||
msgid "Remove an installed package"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: install.go:151
 | 
			
		||||
#: install.go:156
 | 
			
		||||
msgid "Command remove expected at least 1 argument, got %d"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
#: install.go:163
 | 
			
		||||
#: install.go:168
 | 
			
		||||
msgid "Error removing packages"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,8 @@ msgid "Path to the build script"
 | 
			
		||||
msgstr "Путь к скрипту сборки"
 | 
			
		||||
 | 
			
		||||
#: build.go:55
 | 
			
		||||
msgid "Specify package in script (for multi package script only)"
 | 
			
		||||
#, fuzzy
 | 
			
		||||
msgid "Specify subpackage in script (for multi package script only)"
 | 
			
		||||
msgstr "Укажите пакет в скрипте (только для многопакетного скрипта)"
 | 
			
		||||
 | 
			
		||||
#: build.go:60
 | 
			
		||||
@@ -165,15 +166,15 @@ msgstr "Установить новый пакет"
 | 
			
		||||
msgid "Command install expected at least 1 argument, got %d"
 | 
			
		||||
msgstr "Для команды install ожидался хотя бы 1 аргумент, получено %d"
 | 
			
		||||
 | 
			
		||||
#: install.go:146
 | 
			
		||||
#: install.go:151
 | 
			
		||||
msgid "Remove an installed package"
 | 
			
		||||
msgstr "Удалить установленный пакет"
 | 
			
		||||
 | 
			
		||||
#: install.go:151
 | 
			
		||||
#: install.go:156
 | 
			
		||||
msgid "Command remove expected at least 1 argument, got %d"
 | 
			
		||||
msgstr "Для команды remove ожидался хотя бы 1 аргумент, получено %d"
 | 
			
		||||
 | 
			
		||||
#: install.go:163
 | 
			
		||||
#: install.go:168
 | 
			
		||||
msgid "Error removing packages"
 | 
			
		||||
msgstr "Ошибка при удалении пакетов"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user