From 323671d53e79d31a5a418d7d3d3bf0424daaf29b Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Wed, 17 Aug 2022 12:24:10 +0200 Subject: [PATCH 1/3] Improve wording for `sg extensions` command --- cmd/src/extensions.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/src/extensions.go b/cmd/src/extensions.go index 9f2aebbe4c..9c33ab3bc2 100644 --- a/cmd/src/extensions.go +++ b/cmd/src/extensions.go @@ -10,7 +10,8 @@ var extensionsCommands commander func init() { usage := `'src extensions' is a tool that manages extensions in the extension registry on a Sourcegraph instance. -EXPERIMENTAL: Extensions are experimental functionality on Sourcegraph and in the 'src' tool. +DEPRECATED: We're in the process of removing Sourcegraph extensions with our September release. + Learn more: https://docs.sourcegraph.com/extensions/deprecation Usage: From 027f0d4c1bbae238bcf984783e3a4951424b0a68 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Wed, 17 Aug 2022 12:24:39 +0200 Subject: [PATCH 2/3] Pass-through error messages for `sg extensions list` query --- cmd/src/extensions_list.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/src/extensions_list.go b/cmd/src/extensions_list.go index 291253278a..4fc945697a 100644 --- a/cmd/src/extensions_list.go +++ b/cmd/src/extensions_list.go @@ -63,6 +63,7 @@ Examples: nodes { ...RegistryExtensionFields } + error } } }` + registryExtensionFragment @@ -71,6 +72,7 @@ Examples: ExtensionRegistry struct { Extensions struct { Nodes []Extension + Error string } } } @@ -81,6 +83,10 @@ Examples: return err } + if result.ExtensionRegistry.Extensions.Error != "" { + return fmt.Errorf("%s", result.ExtensionRegistry.Extensions.Error) + } + for _, extension := range result.ExtensionRegistry.Extensions.Nodes { if err := execTemplate(tmpl, extension); err != nil { return err From 7f741870944c62a50df61af1569a64fd187a9ace Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Wed, 17 Aug 2022 13:34:33 +0200 Subject: [PATCH 3/3] Fix indentation --- cmd/src/extensions_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/src/extensions_list.go b/cmd/src/extensions_list.go index 4fc945697a..6aa5bead6c 100644 --- a/cmd/src/extensions_list.go +++ b/cmd/src/extensions_list.go @@ -63,7 +63,7 @@ Examples: nodes { ...RegistryExtensionFields } - error + error } } }` + registryExtensionFragment