Skip to content

Commit

Permalink
Fix wording for file mounts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszo committed Jan 14, 2025
1 parent 3de66d1 commit 0cdbec2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/gofrs/uuid v4.3.0+incompatible
github.com/gorilla/websocket v1.5.0
github.com/iancoleman/strcase v0.2.0
github.com/koyeb/koyeb-api-client-go v0.0.0-20241206143543-39fbd0d0bf5e
github.com/koyeb/koyeb-api-client-go v0.0.0-20250106150959-2940e5613765
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/manifoldco/promptui v0.9.0
github.com/mitchellh/go-homedir v1.1.0
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,10 @@ github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/koyeb/koyeb-api-client-go v0.0.0-20241129081540-9cecbc45397f h1:jzyPhhyZgLKA3FXMNxyEZiETROBEde4uI4qwHsliBrk=
github.com/koyeb/koyeb-api-client-go v0.0.0-20241129081540-9cecbc45397f/go.mod h1:+oQfFj2WL3gi9Pb+UHbob4D7xaT52mPfKyH1UvWa4PQ=
github.com/koyeb/koyeb-api-client-go v0.0.0-20241206143120-7817d20778fd h1:krjNLKRYbBEExAIEI1maqyo9P3oF1cKevQXiVedTX18=
github.com/koyeb/koyeb-api-client-go v0.0.0-20241206143120-7817d20778fd/go.mod h1:+oQfFj2WL3gi9Pb+UHbob4D7xaT52mPfKyH1UvWa4PQ=
github.com/koyeb/koyeb-api-client-go v0.0.0-20241206143543-39fbd0d0bf5e h1:/pSEDHiuCglPMooi0kcQay0ZmJ1fZys8qre6Jz2iQ7Q=
github.com/koyeb/koyeb-api-client-go v0.0.0-20241206143543-39fbd0d0bf5e/go.mod h1:+oQfFj2WL3gi9Pb+UHbob4D7xaT52mPfKyH1UvWa4PQ=
github.com/koyeb/koyeb-api-client-go v0.0.0-20250106150959-2940e5613765 h1:OaJezhu0iuR0XN6y5Sxc6uARWyPx1WG1ZjBgVgG7jvw=
github.com/koyeb/koyeb-api-client-go v0.0.0-20250106150959-2940e5613765/go.mod h1:+oQfFj2WL3gi9Pb+UHbob4D7xaT52mPfKyH1UvWa4PQ=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
Expand Down
8 changes: 4 additions & 4 deletions pkg/koyeb/flags_list/file_mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func GetNewFilestListFromFlags() func(values []string) ([]Flag[koyeb.File], erro
if _, err := os.Stat(path); errors.Is(err, os.ErrNotExist) {
return nil, &kerrors.CLIError{
What: "Error while configuring the service",
Why: fmt.Sprintf("unable to parse the file flag value \"%s\"", hc.cliValue),
Why: fmt.Sprintf(" Unable to locate file at \"%s\"", path),
Additional: []string{
"File flag value must be specified as SOURCE:PATH[:PERMISSIONS]",
"To remove a mounted file from the service, prefix the path with '!', e.g. '!path'",
Expand All @@ -71,7 +71,7 @@ func GetNewFilestListFromFlags() func(values []string) ([]Flag[koyeb.File], erro
if err != nil {
return nil, &kerrors.CLIError{
What: "Error while configuring the service",
Why: fmt.Sprintf("unable to read the file flag value \"%s\"", hc.cliValue),
Why: fmt.Sprintf("unable to read the file \"%s\"", path),
Additional: []string{
"File flag value must be specified as SOURCE:PATH[:PERMISSIONS]",
"To remove a file mount from the service, prefix it with '!', e.g. '!path'",
Expand All @@ -89,9 +89,9 @@ func GetNewFilestListFromFlags() func(values []string) ([]Flag[koyeb.File], erro
if len(permissions) != 4 {
return nil, &kerrors.CLIError{
What: "Error while configuring the service",
Why: fmt.Sprintf("unable to parse the file flag value \"%s\"", hc.cliValue),
Why: fmt.Sprintf("unable to parse the permissions \"%s\"", permissions),
Additional: []string{
"File mount permission must be specified as SOURCE:PATH:PERMISSIONS",
"File mount permission must be specified as SOURCE:PATH:PERMISSIONS and in format like 0644",
"To remove a file mount from the service, prefix it with '!', e.g. '!path'",
},
Orig: nil,
Expand Down

0 comments on commit 0cdbec2

Please sign in to comment.