Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeodor committed Jun 10, 2024
1 parent 06ab4d8 commit 5da1144
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cli/cmd/deploy/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package deploy

import (
"errors"
"fmt"
"net/http"
"os"

Expand Down Expand Up @@ -39,7 +39,7 @@ be pushed to the organization "organization-slug-a3ecfh2b", and the app name
fn := cmd.HelpFunc()
fn(cmd, args)

return errors.New("only accepts zero or one positional arguments")
return fmt.Errorf("accepts only an optional [app directory] as a positional argument, you provided %d arguments", len(args))
}

if len(args) == 1 {
Expand Down
1 change: 1 addition & 0 deletions cli/cmd/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func Deploy(ctx context.Context, apps AppService, appDir, projectDir, slug strin

return err
}
defer archive.Close()
task.Done()

task = output.StartTask("Uploading app archive")
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/output/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (t *Task) Done() {
fmt.Println(ln + ansiGreen + "OK" + ansiReset)
}

func (t Task) Error() {
func (t *Task) Error() {
ln := t.line(errorcross)
if !t.lineAdded {
fmt.Print("\r")
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func buildApp(buildID string, appPath string) (ok bool) {

func uploadApp(appDir string, toolID string) (buildID string, ok bool) {
defer os.Remove(zipFileName)
task := output.StartTask("Uploading app......")
task := output.StartTask("Uploading app")

secrets := loadSecretsFromEnv(appDir)
buildID, err := pushBuild(zipFileName, string(toolID), secrets)
Expand All @@ -194,7 +194,7 @@ func uploadApp(appDir string, toolID string) (buildID string, ok bool) {
}

func prepareApp(m *manifest.Manifest) (ok bool) {
task := output.StartTask("Preparing upload...")
task := output.StartTask("Preparing upload.")

if err := archive.ZipCreate(".", zipFileName, m.Exclude); err != nil {
output.PrintErrorDetails("Error preparing app.", err)
Expand Down
1 change: 0 additions & 1 deletion cli/testdata/streamlit_app/.gitignore

This file was deleted.

0 comments on commit 5da1144

Please sign in to comment.