Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/account/account_producer_extension_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func init() {
accountCompanyProducerExtensionListCmd.Flags().StringVar(&listExtensionSearch, "search", "", "Filter by name")
accountCompanyProducerExtensionListCmd.Flags().BoolVar(&listExtensionPlugin, "plugin", false, "Show only plugins")
accountCompanyProducerExtensionListCmd.Flags().BoolVar(&listExtensionApp, "app", false, "Show only apps")
accountCompanyProducerExtensionListCmd.Flags().StringVar(&listExtensionFormat, "format", string(tui.TableFormatTable), "Output format (table or json)")
accountCompanyProducerExtensionListCmd.Flags().StringVar(&listExtensionFormat, "format", string(tui.TableFormatTable), "Output format (table, json)")
accountCompanyProducerExtensionListCmd.Flags().BoolVar(&listExtensionJSON, "json", false, "Output as JSON")
accountCompanyProducerExtensionListCmd.MarkFlagsMutuallyExclusive("plugin", "app")
accountCompanyProducerExtensionListCmd.MarkFlagsMutuallyExclusive("format", "json")
Expand Down
1 change: 1 addition & 0 deletions cmd/project/project_admin_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var skipDefaultHeaders bool

var projectAdminApiCmd = &cobra.Command{
Use: "admin-api [method] [path]",
Args: cobra.ArbitraryArgs,
Short: "Run authenticated curl requests against the Shopware Admin API",
RunE: func(cobraCmd *cobra.Command, args []string) error {
projectRoot, err := shop.FindClosestShopwareProject(true)
Expand Down
4 changes: 2 additions & 2 deletions cmd/project/project_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func init() {
projectCreateCmd.PersistentFlags().Bool("git", false, "Initialize a Git repository for a Shopware project")
projectCreateCmd.PersistentFlags().Bool("local-domain", false, "Serve the Shopware project at a stable local hostname (<name>."+proxy.DefaultDomain+" by default) through the shared proxy instead of a port (requires Docker)")
projectCreateCmd.PersistentFlags().String("version", "", "Shopware version to install (e.g. 6.6.0.0, latest, dev-trunk)")
projectCreateCmd.PersistentFlags().String("deployment", "", "Deployment method to configure (none, container, deployer, platformsh, or shopware-paas)")
projectCreateCmd.PersistentFlags().String("deployment", "", "Deployment method to configure (none, container, deployer, platformsh, shopware-paas)")
Comment thread
moshimorschi marked this conversation as resolved.
_ = projectCreateCmd.RegisterFlagCompletionFunc("deployment", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
return []string{
shop.DeploymentNone,
Expand All @@ -248,7 +248,7 @@ func init() {
shop.DeploymentShopwarePaaS,
}, cobra.ShellCompDirectiveNoFileComp
})
projectCreateCmd.PersistentFlags().String("ci", "", "CI/CD system to configure (none, github, or gitlab)")
projectCreateCmd.PersistentFlags().String("ci", "", "CI/CD system to configure (none, github, gitlab)")
projectCreateCmd.PersistentFlags().String("php-version", "", "PHP version for the project (e.g. 8.4); uses the local PHP version for local projects or the image tag for Docker projects")
_ = projectCreateCmd.RegisterFlagCompletionFunc("php-version", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
return shop.SupportedPHPVersions, cobra.ShellCompDirectiveNoFileComp
Expand Down
2 changes: 1 addition & 1 deletion cmd/project/project_extension_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func projectExtensionListTable(extensions adminSdk.ExtensionList) *tui.Table {

func init() {
projectExtensionCmd.AddCommand(projectExtensionListCmd)
projectExtensionListCmd.Flags().String("format", string(tui.TableFormatTable), "Output format (table or json)")
projectExtensionListCmd.Flags().String("format", string(tui.TableFormatTable), "Output format (table, json)")
projectExtensionListCmd.Flags().Bool("json", false, "Output as JSON")
projectExtensionListCmd.MarkFlagsMutuallyExclusive("format", "json")
_ = projectExtensionListCmd.Flags().MarkDeprecated("json", "use --format json instead")
Expand Down
2 changes: 1 addition & 1 deletion cmd/project/project_extension_outdated.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func projectExtensionOutdatedTable(extensions adminSdk.ExtensionList) *tui.Table

func init() {
projectExtensionCmd.AddCommand(projectExtensionOutdatedCmd)
projectExtensionOutdatedCmd.Flags().String("format", string(tui.TableFormatTable), "Output format (table or json)")
projectExtensionOutdatedCmd.Flags().String("format", string(tui.TableFormatTable), "Output format (table, json)")
projectExtensionOutdatedCmd.Flags().Bool("json", false, "Output as JSON")
projectExtensionOutdatedCmd.MarkFlagsMutuallyExclusive("format", "json")
_ = projectExtensionOutdatedCmd.Flags().MarkDeprecated("json", "use --format json instead")
Expand Down
2 changes: 1 addition & 1 deletion cmd/project/project_generate_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func generatePrivatePublicKey(keyLength int) ([]byte, []byte, error) {
rsaPrivKey := encodePrivateKeyToPEM(rsaKey)
rsaPubKey, err := generatePublicKey(rsaKey)
if err != nil {
return nil, nil, fmt.Errorf("unable to generate public key: %v", err)
return nil, nil, fmt.Errorf("cannot generate public key: %w", err)
}

return rsaPubKey, rsaPrivKey, nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/project/project_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ func isTerminalStream(stream any) bool {

func init() {
projectRootCmd.AddCommand(projectSQLCmd)
projectSQLCmd.Flags().String("format", "", "Output format: table, tsv, or json (default: table when stdout is a terminal, tsv otherwise)")
projectSQLCmd.Flags().String("format", "", "Output format (table, tsv, json); defaults to table when stdout is a terminal, tsv otherwise")
projectSQLCmd.Flags().String("file", "", "Path to a SQL file to execute (instead of a query argument or stdin)")
}
1 change: 1 addition & 0 deletions cmd/project/project_upgrade_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

var projectUpgradeCheckCmd = &cobra.Command{
Use: "upgrade-check",
Args: cobra.NoArgs,
Short: "Check that installed extensions are compatible with a future Shopware version",
Deprecated: "use \"project upgrade\" instead, will be removed in October 2026",
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
1 change: 1 addition & 0 deletions cmd/project/project_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (

var projectWorkerCmd = &cobra.Command{
Use: "worker [amount | queue-spec]",
Args: cobra.MaximumNArgs(1),
Short: "Start and supervise Symfony Messenger consumers concurrently",
Long: `Run multiple Symfony Messenger consumers in the background.

Expand Down
2 changes: 1 addition & 1 deletion internal/account-api/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewApi(ctx context.Context) (*Client, error) {
password := os.Getenv("SHOPWARE_CLI_ACCOUNT_PASSWORD")

if email != "" && password != "" {
logging.FromContext(ctx).Warnf("authentication with username/password is deprecated and will be removed in future. Please switch to OAuth2 client credentials, see https://developer.shopware.com/docs/products/cli/shopware-account-commands/authentication.html")
logging.FromContext(ctx).Warnf("Authentication with username and password is deprecated and will be removed in the future. Switch to OAuth2 client credentials: https://developer.shopware.com/docs/products/cli/shopware-account-commands/authentication.html")
return loginWithCredentials(ctx, email, password)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/account-api/producer_store_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func downloadFileTo(ctx context.Context, client *http.Client, url string, target

defer func() {
if err := resp.Body.Close(); err != nil {
logging.FromContext(ctx).Errorf("downloadFileTo: %v", err)
logging.FromContext(ctx).Errorf("Cannot close the download response: %v", err)
}
}()

Expand Down
4 changes: 2 additions & 2 deletions internal/account-api/producer_store_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func parseInlineablePath(path, extensionDir string) (string, error) {

content, err := os.ReadFile(filePath)
if err != nil {
return "", fmt.Errorf("error reading file at path %s with error: %v", filePath, err)
return "", fmt.Errorf("cannot read %s: %w", filePath, err)
}

if filepath.Ext(filePath) != ".md" {
Expand All @@ -336,7 +336,7 @@ func parseInlineablePath(path, extensionDir string) (string, error) {

html, err := markdown.ToHTML(content)
if err != nil {
return "", fmt.Errorf("cannot convert file at path %s from markdown to html with error: %v", filePath, err)
return "", fmt.Errorf("cannot convert %s from Markdown to HTML: %w", filePath, err)
}

return html, nil
Expand Down
2 changes: 1 addition & 1 deletion internal/account-api/producer_store_push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func TestParseInlineablePathMissingFile(t *testing.T) {
_, err := parseInlineablePath("file:missing.html", t.TempDir())

require.Error(t, err)
assert.Contains(t, err.Error(), "error reading file")
assert.Contains(t, err.Error(), "cannot read")
}

func TestLanguageFromLocale(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/archiver/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func Unzip(r *zip.Reader, dest string) error {

// Check for ZipSlip. More Info: http://bit.ly/2MsjAWE
if !strings.HasPrefix(fpath, filepath.Clean(dest)+string(os.PathSeparator)) {
return fmt.Errorf("Unzip: %s: illegal file path", fpath)
return fmt.Errorf("unzip: illegal file path %s", fpath)
}

if f.FileInfo().IsDir() {
Expand Down
2 changes: 1 addition & 1 deletion internal/changelog/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func renderChangelog(commits []git.GitCommit, cfg Config) (string, error) {

var buf bytes.Buffer
if err := templateParsed.Execute(&buf, templateContext); err != nil {
return "", fmt.Errorf("failed to execute template: %v", err)
return "", fmt.Errorf("cannot execute changelog template: %w", err)
}

return strings.Trim(buf.String(), "\n"), nil
Expand Down
2 changes: 1 addition & 1 deletion internal/esbuild/download_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func detectDownloadPrefix(ctx context.Context) string {
resp, err := exec.CommandContext(ctx, "ldd", "--version").CombinedOutput()

if resp == nil {
logging.FromContext(ctx).Infof("cannot run ldd to determine which dart-sass build is requierd: %s, using gnu libc", err)
logging.FromContext(ctx).Warnf("Cannot run ldd to determine which dart-sass build is required: %s, using gnu libc", err)

return ""
}
Expand Down
8 changes: 4 additions & 4 deletions internal/extension/asset_platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func prepareShopwareForAsset(shopwareRoot string, cfgs ExtensionAssetConfig, ass
if _, err := os.Stat(varFolder); os.IsNotExist(err) {
err := os.Mkdir(varFolder, 0o755)
if err != nil {
return fmt.Errorf("prepareShopwareForAsset: %w", err)
return fmt.Errorf("cannot create %s: %w", varFolder, err)
}
}

Expand All @@ -373,16 +373,16 @@ func prepareShopwareForAsset(shopwareRoot string, cfgs ExtensionAssetConfig, ass

pluginJson, err := json.Marshal(normalized)
if err != nil {
return fmt.Errorf("prepareShopwareForAsset: %w", err)
return fmt.Errorf("cannot encode plugins.json: %w", err)
}

if err = os.WriteFile(shopwareRoot+"/var/plugins.json", pluginJson, os.ModePerm); err != nil {
return fmt.Errorf("prepareShopwareForAsset: %w", err)
return fmt.Errorf("cannot write %s: %w", shopwareRoot+"/var/plugins.json", err)
}

err = os.WriteFile(shopwareRoot+"/var/features.json", []byte("{}"), 0o644)
if err != nil {
return fmt.Errorf("prepareShopwareForAsset: %w", err)
return fmt.Errorf("cannot write %s: %w", shopwareRoot+"/var/features.json", err)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion internal/extension/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

func PrepareFolderForZipping(ctx context.Context, path string, ext Extension, extCfg *Config) error {
errorFormat := "PrepareFolderForZipping: %v"
errorFormat := "cannot prepare the extension folder for packaging: %w"
composerJSONPath := filepath.Join(path, "composer.json")
composerLockPath := filepath.Join(path, "composer.lock")

Expand Down
2 changes: 1 addition & 1 deletion internal/shop/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ func applyLocalOverride(ctx context.Context, fileName string, hasBase bool, conf
localFile := LocalConfigFileName(fileName)
if _, err := os.Stat(localFile); err != nil {
if !os.IsNotExist(err) {
logging.FromContext(ctx).Warnf("unable to access local config override %s: %v", localFile, err)
logging.FromContext(ctx).Warnf("Cannot access local config override %s: %v", localFile, err)
}
return false, nil
}
Expand Down
Loading