mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: use consistent function for statefile path (#20527)
We use `getStateFilePath` in 2 locations, and a manual `filepath.Join` here. Just refactored to use the helper function
This commit is contained in:
@@ -608,7 +608,7 @@ func (e *executor) apply(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
statefilePath := filepath.Join(e.workdir, "terraform.tfstate")
|
||||
statefilePath := getStateFilePath(e.workdir)
|
||||
stateContent, err := os.ReadFile(statefilePath)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("read statefile %q: %w", statefilePath, err)
|
||||
|
||||
Reference in New Issue
Block a user