@@ -541,7 +541,7 @@ func createAgent(ctx context.Context, cmd *cli.Command) error {
541541
542542 appLanguage , err := agentfs .DetectAppLanguage (os .DirFS (workingDir ))
543543 if err != nil {
544- return fmt .Errorf ("unable to determine app language: %w. Make sure you are inside an app directory and are using a supported app language" , err )
544+ return fmt .Errorf ("unable to determine app language: %w. Make sure you are inside your app's directory and are using a supported language" , err )
545545 }
546546
547547 if err := requireDockerfile (ctx , cmd , workingDir , appLanguage , settingsMap ); err != nil {
@@ -716,7 +716,7 @@ func deployAgent(ctx context.Context, cmd *cli.Command) error {
716716
717717 appLanguage , err := agentfs .DetectAppLanguage (os .DirFS (workingDir ))
718718 if err != nil {
719- return fmt .Errorf ("unable to determine app language: %w. Make sure you are inside an app directory and are using a supported app language" , err )
719+ return fmt .Errorf ("unable to determine app language: %w. Make sure you are inside your app's directory and are using a supported language" , err )
720720 }
721721
722722 settingsMap , err := getClientSettings (ctx , cmd .Bool ("silent" ))
@@ -1321,7 +1321,7 @@ func requireSecrets(_ context.Context, cmd *cli.Command, required, lazy bool) ([
13211321 return secretsSlice , nil
13221322}
13231323
1324- func requireDockerfile (ctx context.Context , cmd * cli.Command , workingDir string , projectLanguage agentfs.ProjectLanguage , settingsMap map [string ]string ) error {
1324+ func requireDockerfile (ctx context.Context , cmd * cli.Command , workingDir string , appLanguage agentfs.AppLanguage , settingsMap map [string ]string ) error {
13251325 dockerfileExists , err := agentfs .HasDockerfile (workingDir )
13261326 if err != nil {
13271327 return err
@@ -1338,15 +1338,15 @@ func requireDockerfile(ctx context.Context, cmd *cli.Command, workingDir string,
13381338 "Creating Dockerfile..." ,
13391339 ctx ,
13401340 func (ctx context.Context ) error {
1341- return agentfs .CreateDockerfile (workingDir , projectLanguage , settingsMap )
1341+ return agentfs .CreateDockerfile (workingDir , appLanguage , settingsMap )
13421342 },
13431343 )
13441344 if err != nil {
13451345 return err
13461346 }
13471347 fmt .Println ("Created [" + util .Accented ("Dockerfile" ) + "]" )
13481348 } else {
1349- if err := agentfs .CreateDockerfile (workingDir , projectLanguage , settingsMap ); err != nil {
1349+ if err := agentfs .CreateDockerfile (workingDir , appLanguage , settingsMap ); err != nil {
13501350 return err
13511351 }
13521352 }
@@ -1360,7 +1360,7 @@ func requireDockerfile(ctx context.Context, cmd *cli.Command, workingDir string,
13601360 if ! cmd .Bool ("silent" ) {
13611361 fmt .Println ("Creating .dockerignore..." )
13621362 }
1363- if err := agentfs .CreateDockerIgnoreFile (workingDir , projectLanguage ); err != nil {
1363+ if err := agentfs .CreateDockerIgnoreFile (workingDir , appLanguage ); err != nil {
13641364 return err
13651365 }
13661366 fmt .Println ("Created [" + util .Accented (".dockerignore" ) + "]" )
@@ -1436,7 +1436,7 @@ func generateAgentDockerfile(ctx context.Context, cmd *cli.Command) error {
14361436
14371437 appLanguage , err := agentfs .DetectAppLanguage (os .DirFS (workingDir ))
14381438 if err != nil {
1439- return fmt .Errorf ("unable to determine app language: %w. Make sure you are inside an app directory and are using a supported app language" , err )
1439+ return fmt .Errorf ("unable to determine app language: %w. Make sure you are inside your app's directory and are using a supported language" , err )
14401440 }
14411441
14421442 dockerfilePath := filepath .Join (workingDir , "Dockerfile" )
0 commit comments