Skip to content

Commit 152a35a

Browse files
committed
update strings
1 parent 5ed56c8 commit 152a35a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cmd/lk/agent.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,10 @@ func createAgent(ctx context.Context, cmd *cli.Command) error {
540540
}
541541

542542
projectType, err := agentfs.DetectProjectType(os.DirFS(workingDir))
543-
fmt.Printf("Detected project type [%s]\n", util.Accented(string(projectType)))
544543
if err != nil {
545-
return fmt.Errorf("unable to determine project type: %w, please use a supported project type, or create your own Dockerfile in the current directory", err)
544+
return fmt.Errorf("unable to determine app language: %w, please make sure you are inside your app's directory and are using a supported language", err)
546545
}
546+
fmt.Printf("Detected app language [%s]\n", util.Accented(string(projectType)))
547547

548548
if err := requireDockerfile(ctx, cmd, workingDir, projectType, settingsMap); err != nil {
549549
return err
@@ -717,8 +717,9 @@ func deployAgent(ctx context.Context, cmd *cli.Command) error {
717717

718718
projectType, err := agentfs.DetectProjectType(os.DirFS(workingDir))
719719
if err != nil {
720-
return fmt.Errorf("unable to determine project type: %w, please use a supported project type, or create your own Dockerfile in the current directory", err)
720+
return fmt.Errorf("unable to determine app language: %w, please make sure you are inside your app's directory and are using a supported language", err)
721721
}
722+
fmt.Printf("Detected app language [%s]\n", util.Accented(string(projectType)))
722723

723724
settingsMap, err := getClientSettings(ctx, cmd.Bool("silent"))
724725
if err != nil {
@@ -1436,10 +1437,10 @@ func generateAgentDockerfile(ctx context.Context, cmd *cli.Command) error {
14361437
}
14371438

14381439
projectType, err := agentfs.DetectProjectType(os.DirFS(workingDir))
1439-
fmt.Printf("Detected project type [%s]\n", util.Accented(string(projectType)))
14401440
if err != nil {
1441-
return fmt.Errorf("unable to determine project type: %w, please use a supported project type, or create your own Dockerfile in the current directory", err)
1441+
return fmt.Errorf("unable to determine app language: %w, please make sure you are inside your app's directory and are using a supported language", err)
14421442
}
1443+
fmt.Printf("Detected app language [%s]\n", util.Accented(string(projectType)))
14431444

14441445
dockerfilePath := filepath.Join(workingDir, "Dockerfile")
14451446
dockerignorePath := filepath.Join(workingDir, ".dockerignore")

0 commit comments

Comments
 (0)