mirror of
https://github.com/coder/coder.git
synced 2025-08-01 08:28:48 +00:00
chore: Fix golangci-lint configuration and patch errors (#34)
* chore: Fix golangci-lint configuration and patch errors Due to misconfiguration of a linting rules directory, our linter has not been working properly. This change fixes the configuration issue, and all remaining linting errors. * Fix race in peer logging * Fix race and return * Lock on bufferred amount low * Fix mutex lock
This commit is contained in:
@@ -15,9 +15,9 @@ import (
|
||||
// Provision executes `terraform apply`.
|
||||
func (t *terraform) Provision(ctx context.Context, request *proto.Provision_Request) (*proto.Provision_Response, error) {
|
||||
statefilePath := filepath.Join(request.Directory, "terraform.tfstate")
|
||||
err := os.WriteFile(statefilePath, request.State, 0644)
|
||||
err := os.WriteFile(statefilePath, request.State, 0600)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("write statefile %q: %w", err)
|
||||
return nil, xerrors.Errorf("write statefile %q: %w", statefilePath, err)
|
||||
}
|
||||
|
||||
terraform, err := tfexec.NewTerraform(request.Directory, t.binaryPath)
|
||||
|
Reference in New Issue
Block a user