File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
1818
1919 "github.com/launchdarkly/ldcli/cmd/cliflags"
2020 resourcescmd "github.com/launchdarkly/ldcli/cmd/resources"
21+ "github.com/launchdarkly/ldcli/cmd/validators"
2122 "github.com/launchdarkly/ldcli/internal/output"
2223 "github.com/launchdarkly/ldcli/internal/resources"
2324)
@@ -72,6 +73,7 @@ type SourceMapFile struct {
7273
7374func NewUploadCmd (client resources.Client ) * cobra.Command {
7475 cmd := & cobra.Command {
76+ Args : validators .Validate (),
7577 Use : "upload" ,
7678 Short : "Upload sourcemaps" ,
7779 Long : "Upload JavaScript sourcemaps to LaunchDarkly for error monitoring" ,
@@ -133,6 +135,9 @@ func runE(client resources.Client) func(cmd *cobra.Command, args []string) error
133135 if err = json .Unmarshal (res , & projectResult ); err != nil {
134136 return output .NewCmdOutputError (err , viper .GetString (cliflags .OutputFlag ))
135137 }
138+ if projectResult .ID == "" {
139+ return fmt .Errorf ("project %s not found" , projectKey )
140+ }
136141
137142 appVersion := viper .GetString (appVersionFlag )
138143 path := viper .GetString (pathFlag )
You can’t perform that action at this time.
0 commit comments