Skip to content

Commit

Permalink
Merge branch 'master' into docs-update
Browse files Browse the repository at this point in the history
  • Loading branch information
SupriyaKasten committed Aug 16, 2019
2 parents 03328ea + c4a8325 commit 248bb29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/blockstorage/awsefs/awsefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ func (e *efs) VolumeCreate(ctx context.Context, volume blockstorage.Volume) (*bl
if err != nil {
return nil, errors.Wrap(err, "Failed to create EFS instance")
}
if fd.FileSystemId == nil {
return nil, errors.New("Empty filesystem ID")
}
if err = e.waitUntilFileSystemAvailable(ctx, *fd.FileSystemId); err != nil {
return nil, errors.Wrap(err, "EFS instance is not available")
}
vol, err := e.VolumeGet(ctx, volume.ID, volume.Az)
vol, err := e.VolumeGet(ctx, *fd.FileSystemId, volume.Az)
if err != nil {
return nil, errors.Wrap(err, "Failed to get recently create EFS instance")
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/envdir/envdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import (
)

func EnvDir(dir string) ([]string, error) {
// Check if dir doesn't exist or it isn't a directory.
if fi, err := os.Stat(dir); os.IsNotExist(err) || !fi.IsDir() {
return nil, nil
}
fis, err := ioutil.ReadDir(dir)
if err != nil {
return nil, errors.Wrap(err, "failed to read env from dir:"+dir)
Expand Down

0 comments on commit 248bb29

Please sign in to comment.