@@ -490,29 +490,29 @@ func PlaceWorkspaceReadyFile(ctx context.Context, wspath string, initsrc csapi.W
490
490
gitpodDir := filepath .Join (wspath , filepath .Dir (WorkspaceReadyFile ))
491
491
err = os .MkdirAll (gitpodDir , 0777 )
492
492
if err != nil {
493
- return xerrors .Errorf ("cannot write workspace ready file: %w" , err )
493
+ return xerrors .Errorf ("cannot create directory for workspace ready file: %w" , err )
494
494
}
495
495
err = os .Chown (gitpodDir , uid , gid )
496
496
if err != nil {
497
- return xerrors .Errorf ("cannot write workspace- ready file: %w" , err )
497
+ return xerrors .Errorf ("cannot chown directory for workspace ready file: %w" , err )
498
498
}
499
499
500
500
tempWorkspaceReadyFile := WorkspaceReadyFile + ".tmp"
501
501
fn := filepath .Join (wspath , tempWorkspaceReadyFile )
502
502
err = os .WriteFile (fn , []byte (fc ), 0644 )
503
503
if err != nil {
504
- return xerrors .Errorf ("cannot write workspace ready file: %w" , err )
504
+ return xerrors .Errorf ("cannot write workspace ready file content : %w" , err )
505
505
}
506
506
err = os .Chown (fn , uid , gid )
507
507
if err != nil {
508
- return xerrors .Errorf ("cannot write workspace ready file: %w" , err )
508
+ return xerrors .Errorf ("cannot chown workspace ready file: %w" , err )
509
509
}
510
510
511
511
// Theia will listen for a rename event as trigger to start the tasks. This is a rename event
512
512
// because we're writing to the file and this is the most convenient way we can tell Theia that we're done writing.
513
513
err = os .Rename (fn , filepath .Join (wspath , WorkspaceReadyFile ))
514
514
if err != nil {
515
- return xerrors .Errorf ("cannot write workspace ready file: %w" , err )
515
+ return xerrors .Errorf ("cannot rename workspace ready file: %w" , err )
516
516
}
517
517
518
518
return nil
0 commit comments