Skip to content

Commit

Permalink
Merge branch version/0-47-0-RC1 to adopt changes from PR #3566
Browse files Browse the repository at this point in the history
  • Loading branch information
as-builds committed Oct 30, 2024
2 parents 7d2b934 + a7d4759 commit d6acb39
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/projectfile/yamlfield.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"regexp"

"github.com/ActiveState/cli/internal/errs"
"github.com/ActiveState/cli/internal/locale"
"github.com/ActiveState/cli/internal/osutils"
"gopkg.in/yaml.v2"
)

Expand Down Expand Up @@ -56,6 +58,11 @@ func (y *yamlField) Save(path string) error {
}

if err := os.WriteFile(path, out, 0664); err != nil {
if osutils.IsAccessDeniedError(err) {
return locale.WrapInputError(err, "err_migrate_projectfile_access_denied",
"Your project file at '{{.V0}}' is out of date, but State Tool does not have permission to update it. Please make it writeable or re-checkout the project to a writeable location.",
path)
}
return errs.Wrap(err, "ioutil.WriteFile %s failed", path)
}

Expand Down

0 comments on commit d6acb39

Please sign in to comment.