Remove unhelpful error wrapper

This commit is contained in:
Charlie Andrews 2022-03-16 09:36:14 -04:00
parent a2f76fdfe0
commit 64eecef176
6 changed files with 6 additions and 6 deletions

View file

@ -33,7 +33,7 @@ func newCodeCmd(app *App) *cobra.Command {
func (a *App) VSCode(ctx context.Context, codespaceName string, useInsiders bool) error {
codespace, err := getOrChooseCodespace(ctx, a.apiClient, codespaceName)
if err != nil {
return fmt.Errorf("get or choose codespace: %w", err)
return err
}
url := vscodeProtocolURL(codespace.Name, useInsiders)

View file

@ -58,7 +58,7 @@ func TestPendingOperationDisallowsCode(t *testing.T) {
app := testingCodeApp()
if err := app.VSCode(context.Background(), "disabledCodespace", false); err != nil {
if err.Error() != "get or choose codespace: codespace is disabled while it has a pending operation: Some pending operation" {
if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" {
t.Errorf("expected pending operation error, but got: %v", err)
}
} else {

View file

@ -38,7 +38,7 @@ func (a *App) Logs(ctx context.Context, codespaceName string, follow bool) (err
codespace, err := getOrChooseCodespace(ctx, a.apiClient, codespaceName)
if err != nil {
return fmt.Errorf("get or choose codespace: %w", err)
return err
}
authkeys := make(chan error, 1)

View file

@ -12,7 +12,7 @@ func TestPendingOperationDisallowsLogs(t *testing.T) {
app := testingLogsApp()
if err := app.Logs(context.Background(), "disabledCodespace", false); err != nil {
if err.Error() != "get or choose codespace: codespace is disabled while it has a pending operation: Some pending operation" {
if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" {
t.Errorf("expected pending operation error, but got: %v", err)
}
} else {

View file

@ -125,7 +125,7 @@ func (a *App) SSH(ctx context.Context, sshArgs []string, opts sshOptions) (err e
codespace, err := getOrChooseCodespace(ctx, a.apiClient, opts.codespace)
if err != nil {
return fmt.Errorf("get or choose codespace: %w", err)
return err
}
liveshareLogger := noopLogger()

View file

@ -12,7 +12,7 @@ func TestPendingOperationDisallowsSSH(t *testing.T) {
app := testingSSHApp()
if err := app.SSH(context.Background(), []string{}, sshOptions{codespace: "disabledCodespace"}); err != nil {
if err.Error() != "get or choose codespace: codespace is disabled while it has a pending operation: Some pending operation" {
if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" {
t.Errorf("expected pending operation error, but got: %v", err)
}
} else {