Skip to content

Commit

Permalink
arduino#1447 - Add a proto changes draft.
Browse files Browse the repository at this point in the history
Add TODO where to return the content.
  • Loading branch information
4ntoine committed Sep 13, 2021
1 parent aeebba5 commit 5cca391
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream
} else {
builderCtx.BuildPath = paths.New(req.GetBuildPath()).Canonical()
}

if req.ReturnFileContent()

if err = builderCtx.BuildPath.MkdirAll(); err != nil {
return nil, &commands.PermissionDeniedError{Message: tr("Cannot create build directory"), Cause: err}
}
Expand Down Expand Up @@ -280,6 +283,8 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream
return r, &commands.PermissionDeniedError{Message: tr("Error copying output file %s", buildFile), Cause: err}
}
}

// TODO: check if file contens was requestd and return it in response (probably archive?).
}

importedLibs := []*rpc.Library{}
Expand Down

0 comments on commit 5cca391

Please sign in to comment.